home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / gfx / misc / gnuplot-src.lha / gnuplot-3.7.1src / gnuplot-3.7.1.lha / gnuplot-3.7.1 / configure < prev    next >
Encoding:
Text File  |  1999-10-28  |  152.8 KB  |  5,291 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.13 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-readline         use the builtin minimal readline function (default)
  16.   --without-readline      do not use the builtin readline function
  17.   --with-readline=gnu     use the GNU readline library
  18.   --with-readline=PATH            Specify the location of GNU readline"
  19. ac_help="$ac_help
  20.   --with-plot             use the Unix plot library
  21.   --with-plot=PATH                Specify the location of GNU libplot"
  22. ac_help="$ac_help
  23.   --with-gd               enable gif terminal with Tom Boutell's gd library
  24.                           (requires GD library)
  25.   --with-gd=PATH                  Specify the location of libgd"
  26. ac_help="$ac_help
  27.   --with-png              enable png terminal
  28.                           (requires libpng and libz)
  29.   --with-png=PATH                 Specify the location of libpng"
  30. ac_help="$ac_help
  31.   --with-cwdrc            check current directory for .gnuplot file,
  32.                           normally disabled for security reasons"
  33. ac_help="$ac_help
  34.   --with-lasergnu         install lasergnu printer script"
  35. ac_help="$ac_help
  36.   --with-linux-vga        use the Linux SVGA console driver
  37.                           (requires /usr/lib/libvga)"
  38. ac_help="$ac_help
  39.   --enable-iris           enable IRIS terminal (IRIS4D only)"
  40. ac_help="$ac_help
  41.   --enable-mgr            enable MGR terminal"
  42. ac_help="$ac_help
  43.   --enable-rgip           enable Redwood Graphics Interface Protocol"
  44. ac_help="$ac_help
  45.   --with-x                use the X Window System"
  46.  
  47. # Initialize some variables set by options.
  48. # The variables have the same names as the options, with
  49. # dashes changed to underlines.
  50. build=NONE
  51. cache_file=./config.cache
  52. exec_prefix=NONE
  53. host=NONE
  54. no_create=
  55. nonopt=NONE
  56. no_recursion=
  57. prefix=NONE
  58. program_prefix=NONE
  59. program_suffix=NONE
  60. program_transform_name=s,x,x,
  61. silent=
  62. site=
  63. srcdir=
  64. target=NONE
  65. verbose=
  66. x_includes=NONE
  67. x_libraries=NONE
  68. bindir='${exec_prefix}/bin'
  69. sbindir='${exec_prefix}/sbin'
  70. libexecdir='${exec_prefix}/libexec'
  71. datadir='${prefix}/share'
  72. sysconfdir='${prefix}/etc'
  73. sharedstatedir='${prefix}/com'
  74. localstatedir='${prefix}/var'
  75. libdir='${exec_prefix}/lib'
  76. includedir='${prefix}/include'
  77. oldincludedir='/usr/include'
  78. infodir='${prefix}/info'
  79. mandir='${prefix}/man'
  80.  
  81. # Initialize some other variables.
  82. subdirs=
  83. MFLAGS= MAKEFLAGS=
  84. SHELL=${CONFIG_SHELL-/bin/sh}
  85. # Maximum number of lines to put in a shell here document.
  86. ac_max_here_lines=12
  87.  
  88. ac_prev=
  89. for ac_option
  90. do
  91.  
  92.   # If the previous option needs an argument, assign it.
  93.   if test -n "$ac_prev"; then
  94.     eval "$ac_prev=\$ac_option"
  95.     ac_prev=
  96.     continue
  97.   fi
  98.  
  99.   case "$ac_option" in
  100.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  101.   *) ac_optarg= ;;
  102.   esac
  103.  
  104.   # Accept the important Cygnus configure options, so we can diagnose typos.
  105.  
  106.   case "$ac_option" in
  107.  
  108.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  109.     ac_prev=bindir ;;
  110.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  111.     bindir="$ac_optarg" ;;
  112.  
  113.   -build | --build | --buil | --bui | --bu)
  114.     ac_prev=build ;;
  115.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  116.     build="$ac_optarg" ;;
  117.  
  118.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  119.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  120.     ac_prev=cache_file ;;
  121.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  122.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  123.     cache_file="$ac_optarg" ;;
  124.  
  125.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  126.     ac_prev=datadir ;;
  127.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  128.   | --da=*)
  129.     datadir="$ac_optarg" ;;
  130.  
  131.   -disable-* | --disable-*)
  132.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  133.     # Reject names that are not valid shell variable names.
  134.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  135.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  136.     fi
  137.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  138.     eval "enable_${ac_feature}=no" ;;
  139.  
  140.   -enable-* | --enable-*)
  141.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  142.     # Reject names that are not valid shell variable names.
  143.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  144.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  145.     fi
  146.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  147.     case "$ac_option" in
  148.       *=*) ;;
  149.       *) ac_optarg=yes ;;
  150.     esac
  151.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  152.  
  153.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  154.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  155.   | --exec | --exe | --ex)
  156.     ac_prev=exec_prefix ;;
  157.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  158.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  159.   | --exec=* | --exe=* | --ex=*)
  160.     exec_prefix="$ac_optarg" ;;
  161.  
  162.   -gas | --gas | --ga | --g)
  163.     # Obsolete; use --with-gas.
  164.     with_gas=yes ;;
  165.  
  166.   -help | --help | --hel | --he)
  167.     # Omit some internal or obsolete options to make the list less imposing.
  168.     # This message is too long to be a string in the A/UX 3.1 sh.
  169.     cat << EOF
  170. Usage: configure [options] [host]
  171. Options: [defaults in brackets after descriptions]
  172. Configuration:
  173.   --cache-file=FILE       cache test results in FILE
  174.   --help                  print this message
  175.   --no-create             do not create output files
  176.   --quiet, --silent       do not print \`checking...' messages
  177.   --version               print the version of autoconf that created configure
  178. Directory and file names:
  179.   --prefix=PREFIX         install architecture-independent files in PREFIX
  180.                           [$ac_default_prefix]
  181.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  182.                           [same as prefix]
  183.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  184.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  185.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  186.   --datadir=DIR           read-only architecture-independent data in DIR
  187.                           [PREFIX/share]
  188.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  189.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  190.                           [PREFIX/com]
  191.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  192.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  193.   --includedir=DIR        C header files in DIR [PREFIX/include]
  194.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  195.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  196.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  197.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  198.   --program-prefix=PREFIX prepend PREFIX to installed program names
  199.   --program-suffix=SUFFIX append SUFFIX to installed program names
  200.   --program-transform-name=PROGRAM
  201.                           run sed PROGRAM on installed program names
  202. EOF
  203.     cat << EOF
  204. Host type:
  205.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  206.   --host=HOST             configure for HOST [guessed]
  207.   --target=TARGET         configure for TARGET [TARGET=HOST]
  208. Features and packages:
  209.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  210.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  211.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  212.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  213.   --x-includes=DIR        X include files are in DIR
  214.   --x-libraries=DIR       X library files are in DIR
  215. EOF
  216.     if test -n "$ac_help"; then
  217.       echo "--enable and --with options recognized:$ac_help"
  218.     fi
  219.     exit 0 ;;
  220.  
  221.   -host | --host | --hos | --ho)
  222.     ac_prev=host ;;
  223.   -host=* | --host=* | --hos=* | --ho=*)
  224.     host="$ac_optarg" ;;
  225.  
  226.   -includedir | --includedir | --includedi | --included | --include \
  227.   | --includ | --inclu | --incl | --inc)
  228.     ac_prev=includedir ;;
  229.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  230.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  231.     includedir="$ac_optarg" ;;
  232.  
  233.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  234.     ac_prev=infodir ;;
  235.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  236.     infodir="$ac_optarg" ;;
  237.  
  238.   -libdir | --libdir | --libdi | --libd)
  239.     ac_prev=libdir ;;
  240.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  241.     libdir="$ac_optarg" ;;
  242.  
  243.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  244.   | --libexe | --libex | --libe)
  245.     ac_prev=libexecdir ;;
  246.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  247.   | --libexe=* | --libex=* | --libe=*)
  248.     libexecdir="$ac_optarg" ;;
  249.  
  250.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  251.   | --localstate | --localstat | --localsta | --localst \
  252.   | --locals | --local | --loca | --loc | --lo)
  253.     ac_prev=localstatedir ;;
  254.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  255.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  256.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  257.     localstatedir="$ac_optarg" ;;
  258.  
  259.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  260.     ac_prev=mandir ;;
  261.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  262.     mandir="$ac_optarg" ;;
  263.  
  264.   -nfp | --nfp | --nf)
  265.     # Obsolete; use --without-fp.
  266.     with_fp=no ;;
  267.  
  268.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  269.   | --no-cr | --no-c)
  270.     no_create=yes ;;
  271.  
  272.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  273.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  274.     no_recursion=yes ;;
  275.  
  276.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  277.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  278.   | --oldin | --oldi | --old | --ol | --o)
  279.     ac_prev=oldincludedir ;;
  280.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  281.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  282.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  283.     oldincludedir="$ac_optarg" ;;
  284.  
  285.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  286.     ac_prev=prefix ;;
  287.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  288.     prefix="$ac_optarg" ;;
  289.  
  290.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  291.   | --program-pre | --program-pr | --program-p)
  292.     ac_prev=program_prefix ;;
  293.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  294.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  295.     program_prefix="$ac_optarg" ;;
  296.  
  297.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  298.   | --program-suf | --program-su | --program-s)
  299.     ac_prev=program_suffix ;;
  300.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  301.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  302.     program_suffix="$ac_optarg" ;;
  303.  
  304.   -program-transform-name | --program-transform-name \
  305.   | --program-transform-nam | --program-transform-na \
  306.   | --program-transform-n | --program-transform- \
  307.   | --program-transform | --program-transfor \
  308.   | --program-transfo | --program-transf \
  309.   | --program-trans | --program-tran \
  310.   | --progr-tra | --program-tr | --program-t)
  311.     ac_prev=program_transform_name ;;
  312.   -program-transform-name=* | --program-transform-name=* \
  313.   | --program-transform-nam=* | --program-transform-na=* \
  314.   | --program-transform-n=* | --program-transform-=* \
  315.   | --program-transform=* | --program-transfor=* \
  316.   | --program-transfo=* | --program-transf=* \
  317.   | --program-trans=* | --program-tran=* \
  318.   | --progr-tra=* | --program-tr=* | --program-t=*)
  319.     program_transform_name="$ac_optarg" ;;
  320.  
  321.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  322.   | -silent | --silent | --silen | --sile | --sil)
  323.     silent=yes ;;
  324.  
  325.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  326.     ac_prev=sbindir ;;
  327.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  328.   | --sbi=* | --sb=*)
  329.     sbindir="$ac_optarg" ;;
  330.  
  331.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  332.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  333.   | --sharedst | --shareds | --shared | --share | --shar \
  334.   | --sha | --sh)
  335.     ac_prev=sharedstatedir ;;
  336.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  337.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  338.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  339.   | --sha=* | --sh=*)
  340.     sharedstatedir="$ac_optarg" ;;
  341.  
  342.   -site | --site | --sit)
  343.     ac_prev=site ;;
  344.   -site=* | --site=* | --sit=*)
  345.     site="$ac_optarg" ;;
  346.  
  347.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  348.     ac_prev=srcdir ;;
  349.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  350.     srcdir="$ac_optarg" ;;
  351.  
  352.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  353.   | --syscon | --sysco | --sysc | --sys | --sy)
  354.     ac_prev=sysconfdir ;;
  355.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  356.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  357.     sysconfdir="$ac_optarg" ;;
  358.  
  359.   -target | --target | --targe | --targ | --tar | --ta | --t)
  360.     ac_prev=target ;;
  361.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  362.     target="$ac_optarg" ;;
  363.  
  364.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  365.     verbose=yes ;;
  366.  
  367.   -version | --version | --versio | --versi | --vers)
  368.     echo "configure generated by autoconf version 2.13"
  369.     exit 0 ;;
  370.  
  371.   -with-* | --with-*)
  372.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  373.     # Reject names that are not valid shell variable names.
  374.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  375.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  376.     fi
  377.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  378.     case "$ac_option" in
  379.       *=*) ;;
  380.       *) ac_optarg=yes ;;
  381.     esac
  382.     eval "with_${ac_package}='$ac_optarg'" ;;
  383.  
  384.   -without-* | --without-*)
  385.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  386.     # Reject names that are not valid shell variable names.
  387.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  388.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  389.     fi
  390.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  391.     eval "with_${ac_package}=no" ;;
  392.  
  393.   --x)
  394.     # Obsolete; use --with-x.
  395.     with_x=yes ;;
  396.  
  397.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  398.   | --x-incl | --x-inc | --x-in | --x-i)
  399.     ac_prev=x_includes ;;
  400.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  401.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  402.     x_includes="$ac_optarg" ;;
  403.  
  404.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  405.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  406.     ac_prev=x_libraries ;;
  407.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  408.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  409.     x_libraries="$ac_optarg" ;;
  410.  
  411.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  412.     ;;
  413.  
  414.   *)
  415.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  416.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  417.     fi
  418.     if test "x$nonopt" != xNONE; then
  419.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  420.     fi
  421.     nonopt="$ac_option"
  422.     ;;
  423.  
  424.   esac
  425. done
  426.  
  427. if test -n "$ac_prev"; then
  428.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  429. fi
  430.  
  431. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  432.  
  433. # File descriptor usage:
  434. # 0 standard input
  435. # 1 file creation
  436. # 2 errors and warnings
  437. # 3 some systems may open it to /dev/tty
  438. # 4 used on the Kubota Titan
  439. # 6 checking for... messages and results
  440. # 5 compiler messages saved in config.log
  441. if test "$silent" = yes; then
  442.   exec 6>/dev/null
  443. else
  444.   exec 6>&1
  445. fi
  446. exec 5>./config.log
  447.  
  448. echo "\
  449. This file contains any messages produced by compilers while
  450. running configure, to aid debugging if configure makes a mistake.
  451. " 1>&5
  452.  
  453. # Strip out --no-create and --no-recursion so they do not pile up.
  454. # Also quote any args containing shell metacharacters.
  455. ac_configure_args=
  456. for ac_arg
  457. do
  458.   case "$ac_arg" in
  459.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  460.   | --no-cr | --no-c) ;;
  461.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  462.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  463.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  464.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  465.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  466.   esac
  467. done
  468.  
  469. # NLS nuisances.
  470. # Only set these to C if already set.  These must not be set unconditionally
  471. # because not all systems understand e.g. LANG=C (notably SCO).
  472. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  473. # Non-C LC_CTYPE values break the ctype check.
  474. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  475. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  476. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  477. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  478.  
  479. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  480. rm -rf conftest* confdefs.h
  481. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  482. echo > confdefs.h
  483.  
  484. # A filename unique to this package, relative to the directory that
  485. # configure is in, which we can look for to find out if srcdir is correct.
  486. ac_unique_file=graphics.c
  487.  
  488. # Find the source files, if location was not specified.
  489. if test -z "$srcdir"; then
  490.   ac_srcdir_defaulted=yes
  491.   # Try the directory containing this script, then its parent.
  492.   ac_prog=$0
  493.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  494.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  495.   srcdir=$ac_confdir
  496.   if test ! -r $srcdir/$ac_unique_file; then
  497.     srcdir=..
  498.   fi
  499. else
  500.   ac_srcdir_defaulted=no
  501. fi
  502. if test ! -r $srcdir/$ac_unique_file; then
  503.   if test "$ac_srcdir_defaulted" = yes; then
  504.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  505.   else
  506.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  507.   fi
  508. fi
  509. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  510.  
  511. # Prefer explicitly selected file to automatically selected ones.
  512. if test -z "$CONFIG_SITE"; then
  513.   if test "x$prefix" != xNONE; then
  514.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  515.   else
  516.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  517.   fi
  518. fi
  519. for ac_site_file in $CONFIG_SITE; do
  520.   if test -r "$ac_site_file"; then
  521.     echo "loading site script $ac_site_file"
  522.     . "$ac_site_file"
  523.   fi
  524. done
  525.  
  526. if test -r "$cache_file"; then
  527.   echo "loading cache $cache_file"
  528.   . $cache_file
  529. else
  530.   echo "creating cache $cache_file"
  531.   > $cache_file
  532. fi
  533.  
  534. ac_ext=c
  535. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  536. ac_cpp='$CPP $CPPFLAGS'
  537. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  538. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  539. cross_compiling=$ac_cv_prog_cc_cross
  540.  
  541. ac_exeext=
  542. ac_objext=o
  543. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  544.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  545.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  546.     ac_n= ac_c='
  547. ' ac_t='    '
  548.   else
  549.     ac_n=-n ac_c= ac_t=
  550.   fi
  551. else
  552.   ac_n= ac_c='\c' ac_t=
  553. fi
  554.  
  555.  
  556.  
  557. # From configure.in Revision: 1.41.2.7 
  558. VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '`
  559. PL=`sed -n 's/.*patchlevel.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '`
  560. ac_aux_dir=
  561. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  562.   if test -f $ac_dir/install-sh; then
  563.     ac_aux_dir=$ac_dir
  564.     ac_install_sh="$ac_aux_dir/install-sh -c"
  565.     break
  566.   elif test -f $ac_dir/install.sh; then
  567.     ac_aux_dir=$ac_dir
  568.     ac_install_sh="$ac_aux_dir/install.sh -c"
  569.     break
  570.   fi
  571. done
  572. if test -z "$ac_aux_dir"; then
  573.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  574. fi
  575. ac_config_guess=$ac_aux_dir/config.guess
  576. ac_config_sub=$ac_aux_dir/config.sub
  577. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  578.  
  579. # Find a good install program.  We prefer a C program (faster),
  580. # so one script is as good as another.  But avoid the broken or
  581. # incompatible versions:
  582. # SysV /etc/install, /usr/sbin/install
  583. # SunOS /usr/etc/install
  584. # IRIX /sbin/install
  585. # AIX /bin/install
  586. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  587. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  588. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  589. # ./install, which can be erroneously created by make from ./install.sh.
  590. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  591. echo "configure:592: checking for a BSD compatible install" >&5
  592. if test -z "$INSTALL"; then
  593. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  594.   echo $ac_n "(cached) $ac_c" 1>&6
  595. else
  596.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS=":"
  597.   for ac_dir in $PATH; do
  598.     # Account for people who put trailing slashes in PATH elements.
  599.     case "$ac_dir/" in
  600.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  601.     *)
  602.       # OSF1 and SCO ODT 3.0 have their own names for install.
  603.       # Don't use installbsd from OSF since it installs stuff as root
  604.       # by default.
  605.       for ac_prog in ginstall scoinst install; do
  606.         if test -f $ac_dir/$ac_prog; then
  607.       if test $ac_prog = install &&
  608.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  609.         # AIX install.  It has an incompatible calling convention.
  610.         :
  611.       else
  612.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  613.         break 2
  614.       fi
  615.     fi
  616.       done
  617.       ;;
  618.     esac
  619.   done
  620.   IFS="$ac_save_IFS"
  621.  
  622. fi
  623.   if test "${ac_cv_path_install+set}" = set; then
  624.     INSTALL="$ac_cv_path_install"
  625.   else
  626.     # As a last resort, use the slow shell script.  We don't cache a
  627.     # path for INSTALL within a source directory, because that will
  628.     # break other packages using the cache if that directory is
  629.     # removed, or if the path is relative.
  630.     INSTALL="$ac_install_sh"
  631.   fi
  632. fi
  633. echo "$ac_t""$INSTALL" 1>&6
  634.  
  635. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  636. # It thinks the first close brace ends the variable substitution.
  637. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  638.  
  639. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  640.  
  641. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  642.  
  643. echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  644. echo "configure:645: checking whether build environment is sane" >&5
  645. # Just in case
  646. sleep 1
  647. echo timestamp > conftestfile
  648. # Do `set' in a subshell so we don't clobber the current shell's
  649. # arguments.  Must try -L first in case configure is actually a
  650. # symlink; some systems play weird games with the mod time of symlinks
  651. # (eg FreeBSD returns the mod time of the symlink's containing
  652. # directory).
  653. if (
  654.    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  655.    if test "$*" = "X"; then
  656.       # -L didn't work.
  657.       set X `ls -t $srcdir/configure conftestfile`
  658.    fi
  659.    if test "$*" != "X $srcdir/configure conftestfile" \
  660.       && test "$*" != "X conftestfile $srcdir/configure"; then
  661.  
  662.       # If neither matched, then we have a broken ls.  This can happen
  663.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  664.       # broken ls alias from the environment.  This has actually
  665.       # happened.  Such a system could not be considered "sane".
  666.       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
  667. alias in your environment" 1>&2; exit 1; }
  668.    fi
  669.  
  670.    test "$2" = conftestfile
  671.    )
  672. then
  673.    # Ok.
  674.    :
  675. else
  676.    { echo "configure: error: newly created file is older than distributed files!
  677. Check your system clock" 1>&2; exit 1; }
  678. fi
  679. rm -f conftest*
  680. echo "$ac_t""yes" 1>&6
  681. if test "$program_transform_name" = s,x,x,; then
  682.   program_transform_name=
  683. else
  684.   # Double any \ or $.  echo might interpret backslashes.
  685.   cat <<\EOF_SED > conftestsed
  686. s,\\,\\\\,g; s,\$,$$,g
  687. EOF_SED
  688.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  689.   rm -f conftestsed
  690. fi
  691. test "$program_prefix" != NONE &&
  692.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  693. # Use a double $ so make ignores it.
  694. test "$program_suffix" != NONE &&
  695.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  696.  
  697. # sed with no file args requires a program.
  698. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  699.  
  700. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  701. echo "configure:702: checking whether ${MAKE-make} sets \${MAKE}" >&5
  702. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  703. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  704.   echo $ac_n "(cached) $ac_c" 1>&6
  705. else
  706.   cat > conftestmake <<\EOF
  707. all:
  708.     @echo 'ac_maketemp="${MAKE}"'
  709. EOF
  710. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  711. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  712. if test -n "$ac_maketemp"; then
  713.   eval ac_cv_prog_make_${ac_make}_set=yes
  714. else
  715.   eval ac_cv_prog_make_${ac_make}_set=no
  716. fi
  717. rm -f conftestmake
  718. fi
  719. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  720.   echo "$ac_t""yes" 1>&6
  721.   SET_MAKE=
  722. else
  723.   echo "$ac_t""no" 1>&6
  724.   SET_MAKE="MAKE=${MAKE-make}"
  725. fi
  726.  
  727.  
  728.  
  729. PACKAGE=gnuplot
  730.  
  731. VERSION=$VERSION.$PL
  732.  
  733. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  734.   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
  735. fi
  736. cat >> confdefs.h <<EOF
  737. #define PACKAGE "$PACKAGE"
  738. EOF
  739.  
  740. cat >> confdefs.h <<EOF
  741. #define VERSION "$VERSION"
  742. EOF
  743.  
  744.  
  745.  
  746. missing_dir=`cd $ac_aux_dir && pwd`
  747. echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
  748. echo "configure:749: checking for working aclocal" >&5
  749. # Run test in a subshell; some versions of sh will print an error if
  750. # an executable is not found, even if stderr is redirected.
  751. # Redirect stdin to placate older versions of autoconf.  Sigh.
  752. if (aclocal --version) < /dev/null > /dev/null 2>&1; then
  753.    ACLOCAL=aclocal
  754.    echo "$ac_t""found" 1>&6
  755. else
  756.    ACLOCAL="$missing_dir/missing aclocal"
  757.    echo "$ac_t""missing" 1>&6
  758. fi
  759.  
  760. echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
  761. echo "configure:762: checking for working autoconf" >&5
  762. # Run test in a subshell; some versions of sh will print an error if
  763. # an executable is not found, even if stderr is redirected.
  764. # Redirect stdin to placate older versions of autoconf.  Sigh.
  765. if (autoconf --version) < /dev/null > /dev/null 2>&1; then
  766.    AUTOCONF=autoconf
  767.    echo "$ac_t""found" 1>&6
  768. else
  769.    AUTOCONF="$missing_dir/missing autoconf"
  770.    echo "$ac_t""missing" 1>&6
  771. fi
  772.  
  773. echo $ac_n "checking for working automake""... $ac_c" 1>&6
  774. echo "configure:775: checking for working automake" >&5
  775. # Run test in a subshell; some versions of sh will print an error if
  776. # an executable is not found, even if stderr is redirected.
  777. # Redirect stdin to placate older versions of autoconf.  Sigh.
  778. if (automake --version) < /dev/null > /dev/null 2>&1; then
  779.    AUTOMAKE=automake
  780.    echo "$ac_t""found" 1>&6
  781. else
  782.    AUTOMAKE="$missing_dir/missing automake"
  783.    echo "$ac_t""missing" 1>&6
  784. fi
  785.  
  786. echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
  787. echo "configure:788: checking for working autoheader" >&5
  788. # Run test in a subshell; some versions of sh will print an error if
  789. # an executable is not found, even if stderr is redirected.
  790. # Redirect stdin to placate older versions of autoconf.  Sigh.
  791. if (autoheader --version) < /dev/null > /dev/null 2>&1; then
  792.    AUTOHEADER=autoheader
  793.    echo "$ac_t""found" 1>&6
  794. else
  795.    AUTOHEADER="$missing_dir/missing autoheader"
  796.    echo "$ac_t""missing" 1>&6
  797. fi
  798.  
  799. echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
  800. echo "configure:801: checking for working makeinfo" >&5
  801. # Run test in a subshell; some versions of sh will print an error if
  802. # an executable is not found, even if stderr is redirected.
  803. # Redirect stdin to placate older versions of autoconf.  Sigh.
  804. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
  805.    MAKEINFO=makeinfo
  806.    echo "$ac_t""found" 1>&6
  807. else
  808.    MAKEINFO="$missing_dir/missing makeinfo"
  809.    echo "$ac_t""missing" 1>&6
  810. fi
  811.  
  812. install_sh="$missing_dir/install-sh"
  813. test -f "$install_sh" || install_sh="$missing_dir/install.sh"
  814.  
  815. for ac_prog in gnutar gtar tar
  816. do
  817. # Extract the first word of "$ac_prog", so it can be a program name with args.
  818. set dummy $ac_prog; ac_word=$2
  819. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  820. echo "configure:821: checking for $ac_word" >&5
  821. if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
  822.   echo $ac_n "(cached) $ac_c" 1>&6
  823. else
  824.   if test -n "$AMTAR"; then
  825.   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
  826. else
  827.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  828.   ac_dummy="$PATH"
  829.   for ac_dir in $ac_dummy; do
  830.     test -z "$ac_dir" && ac_dir=.
  831.     if test -f $ac_dir/$ac_word; then
  832.       ac_cv_prog_AMTAR="$ac_prog"
  833.       break
  834.     fi
  835.   done
  836.   IFS="$ac_save_ifs"
  837. fi
  838. fi
  839. AMTAR="$ac_cv_prog_AMTAR"
  840. if test -n "$AMTAR"; then
  841.   echo "$ac_t""$AMTAR" 1>&6
  842. else
  843.   echo "$ac_t""no" 1>&6
  844. fi
  845.  
  846. test -n "$AMTAR" && break
  847. done
  848.  
  849. AMTARFLAGS=
  850. if test -n "$AMTAR"; then
  851.   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
  852.         AMTARFLAGS=o
  853.   fi
  854. fi
  855.  
  856.  
  857.  
  858.  
  859.  
  860. # Check whether --with-readline or --without-readline was given.
  861. if test "${with_readline+set}" = set; then
  862.   withval="$with_readline"
  863.   :
  864. else
  865.   test -z "$with_readline" && with_readline=yes
  866.  
  867. fi
  868.  
  869. # Check whether --with-plot or --without-plot was given.
  870. if test "${with_plot+set}" = set; then
  871.   withval="$with_plot"
  872.   :
  873. else
  874.   test -z "$with_plot" && with_plot=no
  875.  
  876. fi
  877.  
  878. # Check whether --with-gd or --without-gd was given.
  879. if test "${with_gd+set}" = set; then
  880.   withval="$with_gd"
  881.   :
  882. else
  883.   test -z "$with_gd" && with_gd=yes
  884.  
  885. fi
  886.  
  887. # Check whether --with-png or --without-png was given.
  888. if test "${with_png+set}" = set; then
  889.   withval="$with_png"
  890.   :
  891. else
  892.   test -z "$with_png" && with_png=yes
  893.  
  894. fi
  895.  
  896. # Check whether --with-cwdrc or --without-cwdrc was given.
  897. if test "${with_cwdrc+set}" = set; then
  898.   withval="$with_cwdrc"
  899.   :
  900. else
  901.   test -z "$with_cwdrc" && with_cwdrc=no
  902.  
  903. fi
  904.  
  905. # Check whether --with-lasergnu or --without-lasergnu was given.
  906. if test "${with_lasergnu+set}" = set; then
  907.   withval="$with_lasergnu"
  908.   if test "$withval" = yes; then LASERGNU=lasergnu_install; \
  909. else LASERGNU=lasergnu_noinstall; fi
  910. else
  911.   LASERGNU=lasergnu_noinstall
  912.  
  913. fi
  914.  
  915. # Check whether --with-linux-vga or --without-linux-vga was given.
  916. if test "${with_linux_vga+set}" = set; then
  917.   withval="$with_linux_vga"
  918.   :
  919. else
  920.   test -z "$with_linux_vga" && with_linux_vga=no
  921.  
  922. fi
  923.  
  924. # Check whether --enable-iris or --disable-iris was given.
  925. if test "${enable_iris+set}" = set; then
  926.   enableval="$enable_iris"
  927.   :
  928. else
  929.   test -z "$enable_iris" && enable_iris=no
  930.  
  931. fi
  932.  
  933. # Check whether --enable-mgr or --disable-mgr was given.
  934. if test "${enable_mgr+set}" = set; then
  935.   enableval="$enable_mgr"
  936.   :
  937. else
  938.   test -z "$enable_mgr" && enable_mgr=no
  939.  
  940. fi
  941.  
  942. # Check whether --enable-rgip or --disable-rgip was given.
  943. if test "${enable_rgip+set}" = set; then
  944.   enableval="$enable_rgip"
  945.   :
  946. else
  947.   test -z "$enable_rgip" && enable_rgip=no
  948.  
  949. fi
  950.  
  951.  
  952. # Extract the first word of "gcc", so it can be a program name with args.
  953. set dummy gcc; ac_word=$2
  954. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  955. echo "configure:956: checking for $ac_word" >&5
  956. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  957.   echo $ac_n "(cached) $ac_c" 1>&6
  958. else
  959.   if test -n "$CC"; then
  960.   ac_cv_prog_CC="$CC" # Let the user override the test.
  961. else
  962.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  963.   ac_dummy="$PATH"
  964.   for ac_dir in $ac_dummy; do
  965.     test -z "$ac_dir" && ac_dir=.
  966.     if test -f $ac_dir/$ac_word; then
  967.       ac_cv_prog_CC="gcc"
  968.       break
  969.     fi
  970.   done
  971.   IFS="$ac_save_ifs"
  972. fi
  973. fi
  974. CC="$ac_cv_prog_CC"
  975. if test -n "$CC"; then
  976.   echo "$ac_t""$CC" 1>&6
  977. else
  978.   echo "$ac_t""no" 1>&6
  979. fi
  980.  
  981. if test -z "$CC"; then
  982.   # Extract the first word of "cc", so it can be a program name with args.
  983. set dummy cc; ac_word=$2
  984. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  985. echo "configure:986: checking for $ac_word" >&5
  986. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  987.   echo $ac_n "(cached) $ac_c" 1>&6
  988. else
  989.   if test -n "$CC"; then
  990.   ac_cv_prog_CC="$CC" # Let the user override the test.
  991. else
  992.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  993.   ac_prog_rejected=no
  994.   ac_dummy="$PATH"
  995.   for ac_dir in $ac_dummy; do
  996.     test -z "$ac_dir" && ac_dir=.
  997.     if test -f $ac_dir/$ac_word; then
  998.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  999.         ac_prog_rejected=yes
  1000.     continue
  1001.       fi
  1002.       ac_cv_prog_CC="cc"
  1003.       break
  1004.     fi
  1005.   done
  1006.   IFS="$ac_save_ifs"
  1007. if test $ac_prog_rejected = yes; then
  1008.   # We found a bogon in the path, so make sure we never use it.
  1009.   set dummy $ac_cv_prog_CC
  1010.   shift
  1011.   if test $# -gt 0; then
  1012.     # We chose a different compiler from the bogus one.
  1013.     # However, it has the same basename, so the bogon will be chosen
  1014.     # first if we set CC to just the basename; use the full file name.
  1015.     shift
  1016.     set dummy "$ac_dir/$ac_word" "$@"
  1017.     shift
  1018.     ac_cv_prog_CC="$@"
  1019.   fi
  1020. fi
  1021. fi
  1022. fi
  1023. CC="$ac_cv_prog_CC"
  1024. if test -n "$CC"; then
  1025.   echo "$ac_t""$CC" 1>&6
  1026. else
  1027.   echo "$ac_t""no" 1>&6
  1028. fi
  1029.  
  1030.   if test -z "$CC"; then
  1031.     case "`uname -s`" in
  1032.     *win32* | *WIN32*)
  1033.       # Extract the first word of "cl", so it can be a program name with args.
  1034. set dummy cl; ac_word=$2
  1035. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1036. echo "configure:1037: checking for $ac_word" >&5
  1037. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1038.   echo $ac_n "(cached) $ac_c" 1>&6
  1039. else
  1040.   if test -n "$CC"; then
  1041.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1042. else
  1043.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1044.   ac_dummy="$PATH"
  1045.   for ac_dir in $ac_dummy; do
  1046.     test -z "$ac_dir" && ac_dir=.
  1047.     if test -f $ac_dir/$ac_word; then
  1048.       ac_cv_prog_CC="cl"
  1049.       break
  1050.     fi
  1051.   done
  1052.   IFS="$ac_save_ifs"
  1053. fi
  1054. fi
  1055. CC="$ac_cv_prog_CC"
  1056. if test -n "$CC"; then
  1057.   echo "$ac_t""$CC" 1>&6
  1058. else
  1059.   echo "$ac_t""no" 1>&6
  1060. fi
  1061.  ;;
  1062.     esac
  1063.   fi
  1064.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  1065. fi
  1066.  
  1067. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1068. echo "configure:1069: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  1069.  
  1070. ac_ext=c
  1071. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1072. ac_cpp='$CPP $CPPFLAGS'
  1073. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1074. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1075. cross_compiling=$ac_cv_prog_cc_cross
  1076.  
  1077. cat > conftest.$ac_ext << EOF
  1078.  
  1079. #line 1080 "configure"
  1080. #include "confdefs.h"
  1081.  
  1082. main(){return(0);}
  1083. EOF
  1084. if { (eval echo configure:1085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1085.   ac_cv_prog_cc_works=yes
  1086.   # If we can't run a trivial program, we are probably using a cross compiler.
  1087.   if (./conftest; exit) 2>/dev/null; then
  1088.     ac_cv_prog_cc_cross=no
  1089.   else
  1090.     ac_cv_prog_cc_cross=yes
  1091.   fi
  1092. else
  1093.   echo "configure: failed program was:" >&5
  1094.   cat conftest.$ac_ext >&5
  1095.   ac_cv_prog_cc_works=no
  1096. fi
  1097. rm -fr conftest*
  1098. ac_ext=c
  1099. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1100. ac_cpp='$CPP $CPPFLAGS'
  1101. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1102. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1103. cross_compiling=$ac_cv_prog_cc_cross
  1104.  
  1105. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  1106. if test $ac_cv_prog_cc_works = no; then
  1107.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  1108. fi
  1109. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  1110. echo "configure:1111: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  1111. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  1112. cross_compiling=$ac_cv_prog_cc_cross
  1113.  
  1114. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  1115. echo "configure:1116: checking whether we are using GNU C" >&5
  1116. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  1117.   echo $ac_n "(cached) $ac_c" 1>&6
  1118. else
  1119.   cat > conftest.c <<EOF
  1120. #ifdef __GNUC__
  1121.   yes;
  1122. #endif
  1123. EOF
  1124. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1125.   ac_cv_prog_gcc=yes
  1126. else
  1127.   ac_cv_prog_gcc=no
  1128. fi
  1129. fi
  1130.  
  1131. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  1132.  
  1133. if test $ac_cv_prog_gcc = yes; then
  1134.   GCC=yes
  1135. else
  1136.   GCC=
  1137. fi
  1138.  
  1139. ac_test_CFLAGS="${CFLAGS+set}"
  1140. ac_save_CFLAGS="$CFLAGS"
  1141. CFLAGS=
  1142. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  1143. echo "configure:1144: checking whether ${CC-cc} accepts -g" >&5
  1144. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  1145.   echo $ac_n "(cached) $ac_c" 1>&6
  1146. else
  1147.   echo 'void f(){}' > conftest.c
  1148. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  1149.   ac_cv_prog_cc_g=yes
  1150. else
  1151.   ac_cv_prog_cc_g=no
  1152. fi
  1153. rm -f conftest*
  1154.  
  1155. fi
  1156.  
  1157. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  1158. if test "$ac_test_CFLAGS" = set; then
  1159.   CFLAGS="$ac_save_CFLAGS"
  1160. elif test $ac_cv_prog_cc_g = yes; then
  1161.   if test "$GCC" = yes; then
  1162.     CFLAGS="-g -O2"
  1163.   else
  1164.     CFLAGS="-g"
  1165.   fi
  1166. else
  1167.   if test "$GCC" = yes; then
  1168.     CFLAGS="-O2"
  1169.   else
  1170.     CFLAGS=
  1171.   fi
  1172. fi
  1173.  
  1174.  
  1175.  
  1176.  
  1177. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1178. echo "configure:1179: checking for ${CC-cc} option to accept ANSI C" >&5
  1179. if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
  1180.   echo $ac_n "(cached) $ac_c" 1>&6
  1181. else
  1182.   am_cv_prog_cc_stdc=no
  1183. ac_save_CC="$CC"
  1184. # Don't try gcc -ansi; that turns off useful extensions and
  1185. # breaks some systems' header files.
  1186. # AIX            -qlanglvl=ansi
  1187. # Ultrix and OSF/1    -std1
  1188. # HP-UX 10.20 and later    -Ae
  1189. # HP-UX older versions    -Aa -D_HPUX_SOURCE
  1190. # SVR4            -Xc -D__EXTENSIONS__
  1191. for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  1192. do
  1193.   CC="$ac_save_CC $ac_arg"
  1194.   cat > conftest.$ac_ext <<EOF
  1195. #line 1196 "configure"
  1196. #include "confdefs.h"
  1197. #include <stdarg.h>
  1198. #include <stdio.h>
  1199. #include <sys/types.h>
  1200. #include <sys/stat.h>
  1201. /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
  1202. struct buf { int x; };
  1203. FILE * (*rcsopen) (struct buf *, struct stat *, int);
  1204. static char *e (p, i)
  1205.      char **p;
  1206.      int i;
  1207. {
  1208.   return p[i];
  1209. }
  1210. static char *f (char * (*g) (char **, int), char **p, ...)
  1211. {
  1212.   char *s;
  1213.   va_list v;
  1214.   va_start (v,p);
  1215.   s = g (p, va_arg (v,int));
  1216.   va_end (v);
  1217.   return s;
  1218. }
  1219. int test (int i, double x);
  1220. struct s1 {int (*f) (int a);};
  1221. struct s2 {int (*f) (double a);};
  1222. int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  1223. int argc;
  1224. char **argv;
  1225.  
  1226. int main() {
  1227.  
  1228. return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  1229.  
  1230. ; return 0; }
  1231. EOF
  1232. if { (eval echo configure:1233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1233.   rm -rf conftest*
  1234.   am_cv_prog_cc_stdc="$ac_arg"; break
  1235. else
  1236.   echo "configure: failed program was:" >&5
  1237.   cat conftest.$ac_ext >&5
  1238. fi
  1239. rm -f conftest*
  1240. done
  1241. CC="$ac_save_CC"
  1242.  
  1243. fi
  1244.  
  1245. if test -z "$am_cv_prog_cc_stdc"; then
  1246.   echo "$ac_t""none needed" 1>&6
  1247. else
  1248.   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
  1249. fi
  1250. case "x$am_cv_prog_cc_stdc" in
  1251.   x|xno) ;;
  1252.   *) CC="$CC $am_cv_prog_cc_stdc" ;;
  1253. esac
  1254.  
  1255. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1256. echo "configure:1257: checking how to run the C preprocessor" >&5
  1257. # On Suns, sometimes $CPP names a directory.
  1258. if test -n "$CPP" && test -d "$CPP"; then
  1259.   CPP=
  1260. fi
  1261. if test -z "$CPP"; then
  1262. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1263.   echo $ac_n "(cached) $ac_c" 1>&6
  1264. else
  1265.     # This must be in double quotes, not single quotes, because CPP may get
  1266.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1267.   CPP="${CC-cc} -E"
  1268.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1269.   # not just through cpp.
  1270.   cat > conftest.$ac_ext <<EOF
  1271. #line 1272 "configure"
  1272. #include "confdefs.h"
  1273. #include <assert.h>
  1274. Syntax Error
  1275. EOF
  1276. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1277. { (eval echo configure:1278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1278. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1279. if test -z "$ac_err"; then
  1280.   :
  1281. else
  1282.   echo "$ac_err" >&5
  1283.   echo "configure: failed program was:" >&5
  1284.   cat conftest.$ac_ext >&5
  1285.   rm -rf conftest*
  1286.   CPP="${CC-cc} -E -traditional-cpp"
  1287.   cat > conftest.$ac_ext <<EOF
  1288. #line 1289 "configure"
  1289. #include "confdefs.h"
  1290. #include <assert.h>
  1291. Syntax Error
  1292. EOF
  1293. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1294. { (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1295. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1296. if test -z "$ac_err"; then
  1297.   :
  1298. else
  1299.   echo "$ac_err" >&5
  1300.   echo "configure: failed program was:" >&5
  1301.   cat conftest.$ac_ext >&5
  1302.   rm -rf conftest*
  1303.   CPP="${CC-cc} -nologo -E"
  1304.   cat > conftest.$ac_ext <<EOF
  1305. #line 1306 "configure"
  1306. #include "confdefs.h"
  1307. #include <assert.h>
  1308. Syntax Error
  1309. EOF
  1310. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1311. { (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1312. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1313. if test -z "$ac_err"; then
  1314.   :
  1315. else
  1316.   echo "$ac_err" >&5
  1317.   echo "configure: failed program was:" >&5
  1318.   cat conftest.$ac_ext >&5
  1319.   rm -rf conftest*
  1320.   CPP=/lib/cpp
  1321. fi
  1322. rm -f conftest*
  1323. fi
  1324. rm -f conftest*
  1325. fi
  1326. rm -f conftest*
  1327.   ac_cv_prog_CPP="$CPP"
  1328. fi
  1329.   CPP="$ac_cv_prog_CPP"
  1330. else
  1331.   ac_cv_prog_CPP="$CPP"
  1332. fi
  1333. echo "$ac_t""$CPP" 1>&6
  1334.  
  1335.  
  1336.  
  1337. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  1338. echo "configure:1339: checking for function prototypes" >&5
  1339. if test "$am_cv_prog_cc_stdc" != no; then
  1340.   echo "$ac_t""yes" 1>&6
  1341.   cat >> confdefs.h <<\EOF
  1342. #define PROTOTYPES 1
  1343. EOF
  1344.  
  1345.   U= ANSI2KNR=
  1346. else
  1347.   echo "$ac_t""no" 1>&6
  1348.   U=_ ANSI2KNR=./ansi2knr
  1349.   # Ensure some checks needed by ansi2knr itself.
  1350.   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1351. echo "configure:1352: checking for ANSI C header files" >&5
  1352. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1353.   echo $ac_n "(cached) $ac_c" 1>&6
  1354. else
  1355.   cat > conftest.$ac_ext <<EOF
  1356. #line 1357 "configure"
  1357. #include "confdefs.h"
  1358. #include <stdlib.h>
  1359. #include <stdarg.h>
  1360. #include <string.h>
  1361. #include <float.h>
  1362. EOF
  1363. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1364. { (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1365. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1366. if test -z "$ac_err"; then
  1367.   rm -rf conftest*
  1368.   ac_cv_header_stdc=yes
  1369. else
  1370.   echo "$ac_err" >&5
  1371.   echo "configure: failed program was:" >&5
  1372.   cat conftest.$ac_ext >&5
  1373.   rm -rf conftest*
  1374.   ac_cv_header_stdc=no
  1375. fi
  1376. rm -f conftest*
  1377.  
  1378. if test $ac_cv_header_stdc = yes; then
  1379.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1380. cat > conftest.$ac_ext <<EOF
  1381. #line 1382 "configure"
  1382. #include "confdefs.h"
  1383. #include <string.h>
  1384. EOF
  1385. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1386.   egrep "memchr" >/dev/null 2>&1; then
  1387.   :
  1388. else
  1389.   rm -rf conftest*
  1390.   ac_cv_header_stdc=no
  1391. fi
  1392. rm -f conftest*
  1393.  
  1394. fi
  1395.  
  1396. if test $ac_cv_header_stdc = yes; then
  1397.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1398. cat > conftest.$ac_ext <<EOF
  1399. #line 1400 "configure"
  1400. #include "confdefs.h"
  1401. #include <stdlib.h>
  1402. EOF
  1403. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1404.   egrep "free" >/dev/null 2>&1; then
  1405.   :
  1406. else
  1407.   rm -rf conftest*
  1408.   ac_cv_header_stdc=no
  1409. fi
  1410. rm -f conftest*
  1411.  
  1412. fi
  1413.  
  1414. if test $ac_cv_header_stdc = yes; then
  1415.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1416. if test "$cross_compiling" = yes; then
  1417.   :
  1418. else
  1419.   cat > conftest.$ac_ext <<EOF
  1420. #line 1421 "configure"
  1421. #include "confdefs.h"
  1422. #include <ctype.h>
  1423. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1424. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1425. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1426. int main () { int i; for (i = 0; i < 256; i++)
  1427. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1428. exit (0); }
  1429.  
  1430. EOF
  1431. if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1432. then
  1433.   :
  1434. else
  1435.   echo "configure: failed program was:" >&5
  1436.   cat conftest.$ac_ext >&5
  1437.   rm -fr conftest*
  1438.   ac_cv_header_stdc=no
  1439. fi
  1440. rm -fr conftest*
  1441. fi
  1442.  
  1443. fi
  1444. fi
  1445.  
  1446. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1447. if test $ac_cv_header_stdc = yes; then
  1448.   cat >> confdefs.h <<\EOF
  1449. #define STDC_HEADERS 1
  1450. EOF
  1451.  
  1452. fi
  1453.  
  1454.   for ac_hdr in string.h
  1455. do
  1456. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1457. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1458. echo "configure:1459: checking for $ac_hdr" >&5
  1459. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1460.   echo $ac_n "(cached) $ac_c" 1>&6
  1461. else
  1462.   cat > conftest.$ac_ext <<EOF
  1463. #line 1464 "configure"
  1464. #include "confdefs.h"
  1465. #include <$ac_hdr>
  1466. EOF
  1467. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1468. { (eval echo configure:1469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1469. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1470. if test -z "$ac_err"; then
  1471.   rm -rf conftest*
  1472.   eval "ac_cv_header_$ac_safe=yes"
  1473. else
  1474.   echo "$ac_err" >&5
  1475.   echo "configure: failed program was:" >&5
  1476.   cat conftest.$ac_ext >&5
  1477.   rm -rf conftest*
  1478.   eval "ac_cv_header_$ac_safe=no"
  1479. fi
  1480. rm -f conftest*
  1481. fi
  1482. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1483.   echo "$ac_t""yes" 1>&6
  1484.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1485.   cat >> confdefs.h <<EOF
  1486. #define $ac_tr_hdr 1
  1487. EOF
  1488.  
  1489. else
  1490.   echo "$ac_t""no" 1>&6
  1491. fi
  1492. done
  1493.  
  1494. fi
  1495.  
  1496. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1497. echo "configure:1498: checking how to run the C preprocessor" >&5
  1498. # On Suns, sometimes $CPP names a directory.
  1499. if test -n "$CPP" && test -d "$CPP"; then
  1500.   CPP=
  1501. fi
  1502. if test -z "$CPP"; then
  1503. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1504.   echo $ac_n "(cached) $ac_c" 1>&6
  1505. else
  1506.     # This must be in double quotes, not single quotes, because CPP may get
  1507.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1508.   CPP="${CC-cc} -E"
  1509.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1510.   # not just through cpp.
  1511.   cat > conftest.$ac_ext <<EOF
  1512. #line 1513 "configure"
  1513. #include "confdefs.h"
  1514. #include <assert.h>
  1515. Syntax Error
  1516. EOF
  1517. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1518. { (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1519. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1520. if test -z "$ac_err"; then
  1521.   :
  1522. else
  1523.   echo "$ac_err" >&5
  1524.   echo "configure: failed program was:" >&5
  1525.   cat conftest.$ac_ext >&5
  1526.   rm -rf conftest*
  1527.   CPP="${CC-cc} -E -traditional-cpp"
  1528.   cat > conftest.$ac_ext <<EOF
  1529. #line 1530 "configure"
  1530. #include "confdefs.h"
  1531. #include <assert.h>
  1532. Syntax Error
  1533. EOF
  1534. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1535. { (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1536. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1537. if test -z "$ac_err"; then
  1538.   :
  1539. else
  1540.   echo "$ac_err" >&5
  1541.   echo "configure: failed program was:" >&5
  1542.   cat conftest.$ac_ext >&5
  1543.   rm -rf conftest*
  1544.   CPP="${CC-cc} -nologo -E"
  1545.   cat > conftest.$ac_ext <<EOF
  1546. #line 1547 "configure"
  1547. #include "confdefs.h"
  1548. #include <assert.h>
  1549. Syntax Error
  1550. EOF
  1551. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1552. { (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1553. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1554. if test -z "$ac_err"; then
  1555.   :
  1556. else
  1557.   echo "$ac_err" >&5
  1558.   echo "configure: failed program was:" >&5
  1559.   cat conftest.$ac_ext >&5
  1560.   rm -rf conftest*
  1561.   CPP=/lib/cpp
  1562. fi
  1563. rm -f conftest*
  1564. fi
  1565. rm -f conftest*
  1566. fi
  1567. rm -f conftest*
  1568.   ac_cv_prog_CPP="$CPP"
  1569. fi
  1570.   CPP="$ac_cv_prog_CPP"
  1571. else
  1572.   ac_cv_prog_CPP="$CPP"
  1573. fi
  1574. echo "$ac_t""$CPP" 1>&6
  1575.  
  1576. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1577. echo "configure:1578: checking for working const" >&5
  1578. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1579.   echo $ac_n "(cached) $ac_c" 1>&6
  1580. else
  1581.   cat > conftest.$ac_ext <<EOF
  1582. #line 1583 "configure"
  1583. #include "confdefs.h"
  1584.  
  1585. int main() {
  1586.  
  1587. /* Ultrix mips cc rejects this.  */
  1588. typedef int charset[2]; const charset x;
  1589. /* SunOS 4.1.1 cc rejects this.  */
  1590. char const *const *ccp;
  1591. char **p;
  1592. /* NEC SVR4.0.2 mips cc rejects this.  */
  1593. struct point {int x, y;};
  1594. static struct point const zero = {0,0};
  1595. /* AIX XL C 1.02.0.0 rejects this.
  1596.    It does not let you subtract one const X* pointer from another in an arm
  1597.    of an if-expression whose if-part is not a constant expression */
  1598. const char *g = "string";
  1599. ccp = &g + (g ? g-g : 0);
  1600. /* HPUX 7.0 cc rejects these. */
  1601. ++ccp;
  1602. p = (char**) ccp;
  1603. ccp = (char const *const *) p;
  1604. { /* SCO 3.2v4 cc rejects this.  */
  1605.   char *t;
  1606.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1607.  
  1608.   *t++ = 0;
  1609. }
  1610. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1611.   int x[] = {25, 17};
  1612.   const int *foo = &x[0];
  1613.   ++foo;
  1614. }
  1615. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1616.   typedef const int *iptr;
  1617.   iptr p = 0;
  1618.   ++p;
  1619. }
  1620. { /* AIX XL C 1.02.0.0 rejects this saying
  1621.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1622.   struct s { int j; const int *ap[3]; };
  1623.   struct s *b; b->j = 5;
  1624. }
  1625. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1626.   const int foo = 10;
  1627. }
  1628.  
  1629. ; return 0; }
  1630. EOF
  1631. if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1632.   rm -rf conftest*
  1633.   ac_cv_c_const=yes
  1634. else
  1635.   echo "configure: failed program was:" >&5
  1636.   cat conftest.$ac_ext >&5
  1637.   rm -rf conftest*
  1638.   ac_cv_c_const=no
  1639. fi
  1640. rm -f conftest*
  1641. fi
  1642.  
  1643. echo "$ac_t""$ac_cv_c_const" 1>&6
  1644. if test $ac_cv_c_const = no; then
  1645.   cat >> confdefs.h <<\EOF
  1646. #define const 
  1647. EOF
  1648.  
  1649. fi
  1650.  
  1651. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1652. echo "configure:1653: checking for inline" >&5
  1653. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1654.   echo $ac_n "(cached) $ac_c" 1>&6
  1655. else
  1656.   ac_cv_c_inline=no
  1657. for ac_kw in inline __inline__ __inline; do
  1658.   cat > conftest.$ac_ext <<EOF
  1659. #line 1660 "configure"
  1660. #include "confdefs.h"
  1661.  
  1662. int main() {
  1663. } $ac_kw foo() {
  1664. ; return 0; }
  1665. EOF
  1666. if { (eval echo configure:1667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1667.   rm -rf conftest*
  1668.   ac_cv_c_inline=$ac_kw; break
  1669. else
  1670.   echo "configure: failed program was:" >&5
  1671.   cat conftest.$ac_ext >&5
  1672. fi
  1673. rm -f conftest*
  1674. done
  1675.  
  1676. fi
  1677.  
  1678. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1679. case "$ac_cv_c_inline" in
  1680.   inline | yes) ;;
  1681.   no) cat >> confdefs.h <<\EOF
  1682. #define inline 
  1683. EOF
  1684.  ;;
  1685.   *)  cat >> confdefs.h <<EOF
  1686. #define inline $ac_cv_c_inline
  1687. EOF
  1688.  ;;
  1689. esac
  1690.  
  1691.  
  1692.  
  1693. echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
  1694. echo "configure:1695: checking for preprocessor stringizing operator" >&5
  1695. if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
  1696.   echo $ac_n "(cached) $ac_c" 1>&6
  1697. else
  1698.   cat > conftest.$ac_ext <<EOF
  1699. #line 1700 "configure"
  1700. #include "confdefs.h"
  1701.  
  1702. #define x(y) #y
  1703.  
  1704. char *s = x(teststring);
  1705.  
  1706. EOF
  1707. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1708.   egrep "#teststring" >/dev/null 2>&1; then
  1709.   rm -rf conftest*
  1710.   ac_cv_c_stringize=no
  1711. else
  1712.   rm -rf conftest*
  1713.   ac_cv_c_stringize=yes
  1714. fi
  1715. rm -f conftest*
  1716.  
  1717. fi
  1718.  
  1719. if test "${ac_cv_c_stringize}" = yes
  1720. then
  1721.         cat >> confdefs.h <<\EOF
  1722. #define HAVE_STRINGIZE 1
  1723. EOF
  1724.  
  1725. fi
  1726. echo "$ac_t""${ac_cv_c_stringize}" 1>&6
  1727.  
  1728.  
  1729. echo $ac_n "checking if compiler handles warn and error directives correctly""... $ac_c" 1>&6
  1730. echo "configure:1731: checking if compiler handles warn and error directives correctly" >&5
  1731. cat > conftest.$ac_ext <<EOF
  1732. #line 1733 "configure"
  1733. #include "confdefs.h"
  1734. #if 0
  1735. #error "error"
  1736. #warning "warning"
  1737. #endif
  1738. EOF
  1739. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1740. { (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1741. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1742. if test -z "$ac_err"; then
  1743.   rm -rf conftest*
  1744.   ERRORFIX=
  1745.   echo "$ac_t""yes" 1>&6
  1746. else
  1747.   echo "$ac_err" >&5
  1748.   echo "configure: failed program was:" >&5
  1749.   cat conftest.$ac_ext >&5
  1750.   rm -rf conftest*
  1751.     ERRORFIX=errorfix
  1752.   echo "$ac_t""no" 1>&6
  1753. fi
  1754. rm -f conftest*
  1755.  
  1756.  
  1757.  
  1758.  
  1759. # If we find X, set shell vars x_includes and x_libraries to the
  1760. # paths, otherwise set no_x=yes.
  1761. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1762. # --without-x overrides everything else, but does not touch the cache.
  1763. echo $ac_n "checking for X""... $ac_c" 1>&6
  1764. echo "configure:1765: checking for X" >&5
  1765.  
  1766. # Check whether --with-x or --without-x was given.
  1767. if test "${with_x+set}" = set; then
  1768.   withval="$with_x"
  1769.   :
  1770. fi
  1771.  
  1772. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1773. if test "x$with_x" = xno; then
  1774.   # The user explicitly disabled X.
  1775.   have_x=disabled
  1776. else
  1777.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1778.     # Both variables are already set.
  1779.     have_x=yes
  1780.   else
  1781. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1782.   echo $ac_n "(cached) $ac_c" 1>&6
  1783. else
  1784.   # One or both of the vars are not set, and there is no cached value.
  1785. ac_x_includes=NO ac_x_libraries=NO
  1786. rm -fr conftestdir
  1787. if mkdir conftestdir; then
  1788.   cd conftestdir
  1789.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1790.   cat > Imakefile <<'EOF'
  1791. acfindx:
  1792.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1793. EOF
  1794.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1795.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1796.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1797.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1798.     for ac_extension in a so sl; do
  1799.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1800.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1801.         ac_im_usrlibdir=$ac_im_libdir; break
  1802.       fi
  1803.     done
  1804.     # Screen out bogus values from the imake configuration.  They are
  1805.     # bogus both because they are the default anyway, and because
  1806.     # using them would break gcc on systems where it needs fixed includes.
  1807.     case "$ac_im_incroot" in
  1808.     /usr/include) ;;
  1809.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1810.     esac
  1811.     case "$ac_im_usrlibdir" in
  1812.     /usr/lib | /lib) ;;
  1813.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1814.     esac
  1815.   fi
  1816.   cd ..
  1817.   rm -fr conftestdir
  1818. fi
  1819.  
  1820. if test "$ac_x_includes" = NO; then
  1821.   # Guess where to find include files, by looking for this one X11 .h file.
  1822.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1823.  
  1824.   # First, try using that file with no special directory specified.
  1825. cat > conftest.$ac_ext <<EOF
  1826. #line 1827 "configure"
  1827. #include "confdefs.h"
  1828. #include <$x_direct_test_include>
  1829. EOF
  1830. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1831. { (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1832. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1833. if test -z "$ac_err"; then
  1834.   rm -rf conftest*
  1835.   # We can compile using X headers with no special include directory.
  1836. ac_x_includes=
  1837. else
  1838.   echo "$ac_err" >&5
  1839.   echo "configure: failed program was:" >&5
  1840.   cat conftest.$ac_ext >&5
  1841.   rm -rf conftest*
  1842.   # Look for the header file in a standard set of common directories.
  1843. # Check X11 before X11Rn because it is often a symlink to the current release.
  1844.   for ac_dir in               \
  1845.     /usr/X11/include          \
  1846.     /usr/X11R6/include        \
  1847.     /usr/X11R5/include        \
  1848.     /usr/X11R4/include        \
  1849.                               \
  1850.     /usr/include/X11          \
  1851.     /usr/include/X11R6        \
  1852.     /usr/include/X11R5        \
  1853.     /usr/include/X11R4        \
  1854.                               \
  1855.     /usr/local/X11/include    \
  1856.     /usr/local/X11R6/include  \
  1857.     /usr/local/X11R5/include  \
  1858.     /usr/local/X11R4/include  \
  1859.                               \
  1860.     /usr/local/include/X11    \
  1861.     /usr/local/include/X11R6  \
  1862.     /usr/local/include/X11R5  \
  1863.     /usr/local/include/X11R4  \
  1864.                               \
  1865.     /usr/X386/include         \
  1866.     /usr/x386/include         \
  1867.     /usr/XFree86/include/X11  \
  1868.                               \
  1869.     /usr/include              \
  1870.     /usr/local/include        \
  1871.     /usr/unsupported/include  \
  1872.     /usr/athena/include       \
  1873.     /usr/local/x11r5/include  \
  1874.     /usr/lpp/Xamples/include  \
  1875.                               \
  1876.     /usr/openwin/include      \
  1877.     /usr/openwin/share/include \
  1878.     ; \
  1879.   do
  1880.     if test -r "$ac_dir/$x_direct_test_include"; then
  1881.       ac_x_includes=$ac_dir
  1882.       break
  1883.     fi
  1884.   done
  1885. fi
  1886. rm -f conftest*
  1887. fi # $ac_x_includes = NO
  1888.  
  1889. if test "$ac_x_libraries" = NO; then
  1890.   # Check for the libraries.
  1891.  
  1892.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1893.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1894.  
  1895.   # See if we find them without any special options.
  1896.   # Don't add to $LIBS permanently.
  1897.   ac_save_LIBS="$LIBS"
  1898.   LIBS="-l$x_direct_test_library $LIBS"
  1899. cat > conftest.$ac_ext <<EOF
  1900. #line 1901 "configure"
  1901. #include "confdefs.h"
  1902.  
  1903. int main() {
  1904. ${x_direct_test_function}()
  1905. ; return 0; }
  1906. EOF
  1907. if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1908.   rm -rf conftest*
  1909.   LIBS="$ac_save_LIBS"
  1910. # We can link X programs with no special library path.
  1911. ac_x_libraries=
  1912. else
  1913.   echo "configure: failed program was:" >&5
  1914.   cat conftest.$ac_ext >&5
  1915.   rm -rf conftest*
  1916.   LIBS="$ac_save_LIBS"
  1917. # First see if replacing the include by lib works.
  1918. # Check X11 before X11Rn because it is often a symlink to the current release.
  1919. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1920.     /usr/X11/lib          \
  1921.     /usr/X11R6/lib        \
  1922.     /usr/X11R5/lib        \
  1923.     /usr/X11R4/lib        \
  1924.                           \
  1925.     /usr/lib/X11          \
  1926.     /usr/lib/X11R6        \
  1927.     /usr/lib/X11R5        \
  1928.     /usr/lib/X11R4        \
  1929.                           \
  1930.     /usr/local/X11/lib    \
  1931.     /usr/local/X11R6/lib  \
  1932.     /usr/local/X11R5/lib  \
  1933.     /usr/local/X11R4/lib  \
  1934.                           \
  1935.     /usr/local/lib/X11    \
  1936.     /usr/local/lib/X11R6  \
  1937.     /usr/local/lib/X11R5  \
  1938.     /usr/local/lib/X11R4  \
  1939.                           \
  1940.     /usr/X386/lib         \
  1941.     /usr/x386/lib         \
  1942.     /usr/XFree86/lib/X11  \
  1943.                           \
  1944.     /usr/lib              \
  1945.     /usr/local/lib        \
  1946.     /usr/unsupported/lib  \
  1947.     /usr/athena/lib       \
  1948.     /usr/local/x11r5/lib  \
  1949.     /usr/lpp/Xamples/lib  \
  1950.     /lib/usr/lib/X11      \
  1951.                           \
  1952.     /usr/openwin/lib      \
  1953.     /usr/openwin/share/lib \
  1954.     ; \
  1955. do
  1956.   for ac_extension in a so sl; do
  1957.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1958.       ac_x_libraries=$ac_dir
  1959.       break 2
  1960.     fi
  1961.   done
  1962. done
  1963. fi
  1964. rm -f conftest*
  1965. fi # $ac_x_libraries = NO
  1966.  
  1967. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1968.   # Didn't find X anywhere.  Cache the known absence of X.
  1969.   ac_cv_have_x="have_x=no"
  1970. else
  1971.   # Record where we found X for the cache.
  1972.   ac_cv_have_x="have_x=yes \
  1973.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1974. fi
  1975. fi
  1976.   fi
  1977.   eval "$ac_cv_have_x"
  1978. fi # $with_x != no
  1979.  
  1980. if test "$have_x" != yes; then
  1981.   echo "$ac_t""$have_x" 1>&6
  1982.   no_x=yes
  1983. else
  1984.   # If each of the values was on the command line, it overrides each guess.
  1985.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1986.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1987.   # Update the cache value to reflect the command line values.
  1988.   ac_cv_have_x="have_x=yes \
  1989.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1990.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1991. fi
  1992.  
  1993. if test "$no_x" = yes; then
  1994.   # Not all programs may use this symbol, but it does not hurt to define it.
  1995.   cat >> confdefs.h <<\EOF
  1996. #define X_DISPLAY_MISSING 1
  1997. EOF
  1998.  
  1999.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  2000. else
  2001.   if test -n "$x_includes"; then
  2002.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  2003.   fi
  2004.  
  2005.   # It would also be nice to do this for all -L options, not just this one.
  2006.   if test -n "$x_libraries"; then
  2007.     X_LIBS="$X_LIBS -L$x_libraries"
  2008.     # For Solaris; some versions of Sun CC require a space after -R and
  2009.     # others require no space.  Words are not sufficient . . . .
  2010.     case "`(uname -sr) 2>/dev/null`" in
  2011.     "SunOS 5"*)
  2012.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  2013. echo "configure:2014: checking whether -R must be followed by a space" >&5
  2014.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  2015.       cat > conftest.$ac_ext <<EOF
  2016. #line 2017 "configure"
  2017. #include "confdefs.h"
  2018.  
  2019. int main() {
  2020.  
  2021. ; return 0; }
  2022. EOF
  2023. if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2024.   rm -rf conftest*
  2025.   ac_R_nospace=yes
  2026. else
  2027.   echo "configure: failed program was:" >&5
  2028.   cat conftest.$ac_ext >&5
  2029.   rm -rf conftest*
  2030.   ac_R_nospace=no
  2031. fi
  2032. rm -f conftest*
  2033.       if test $ac_R_nospace = yes; then
  2034.     echo "$ac_t""no" 1>&6
  2035.     X_LIBS="$X_LIBS -R$x_libraries"
  2036.       else
  2037.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  2038.     cat > conftest.$ac_ext <<EOF
  2039. #line 2040 "configure"
  2040. #include "confdefs.h"
  2041.  
  2042. int main() {
  2043.  
  2044. ; return 0; }
  2045. EOF
  2046. if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2047.   rm -rf conftest*
  2048.   ac_R_space=yes
  2049. else
  2050.   echo "configure: failed program was:" >&5
  2051.   cat conftest.$ac_ext >&5
  2052.   rm -rf conftest*
  2053.   ac_R_space=no
  2054. fi
  2055. rm -f conftest*
  2056.     if test $ac_R_space = yes; then
  2057.       echo "$ac_t""yes" 1>&6
  2058.       X_LIBS="$X_LIBS -R $x_libraries"
  2059.     else
  2060.       echo "$ac_t""neither works" 1>&6
  2061.     fi
  2062.       fi
  2063.       LIBS="$ac_xsave_LIBS"
  2064.     esac
  2065.   fi
  2066.  
  2067.   # Check for system-dependent libraries X programs must link with.
  2068.   # Do this before checking for the system-independent R6 libraries
  2069.   # (-lICE), since we may need -lsocket or whatever for X linking.
  2070.  
  2071.   if test "$ISC" = yes; then
  2072.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  2073.   else
  2074.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  2075.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  2076.     # the Alpha needs dnet_stub (dnet does not exist).
  2077.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  2078. echo "configure:2079: checking for dnet_ntoa in -ldnet" >&5
  2079. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2080. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2081.   echo $ac_n "(cached) $ac_c" 1>&6
  2082. else
  2083.   ac_save_LIBS="$LIBS"
  2084. LIBS="-ldnet  $LIBS"
  2085. cat > conftest.$ac_ext <<EOF
  2086. #line 2087 "configure"
  2087. #include "confdefs.h"
  2088. /* Override any gcc2 internal prototype to avoid an error.  */
  2089. /* We use char because int might match the return type of a gcc2
  2090.     builtin and then its argument prototype would still apply.  */
  2091. char dnet_ntoa();
  2092.  
  2093. int main() {
  2094. dnet_ntoa()
  2095. ; return 0; }
  2096. EOF
  2097. if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2098.   rm -rf conftest*
  2099.   eval "ac_cv_lib_$ac_lib_var=yes"
  2100. else
  2101.   echo "configure: failed program was:" >&5
  2102.   cat conftest.$ac_ext >&5
  2103.   rm -rf conftest*
  2104.   eval "ac_cv_lib_$ac_lib_var=no"
  2105. fi
  2106. rm -f conftest*
  2107. LIBS="$ac_save_LIBS"
  2108.  
  2109. fi
  2110. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2111.   echo "$ac_t""yes" 1>&6
  2112.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  2113. else
  2114.   echo "$ac_t""no" 1>&6
  2115. fi
  2116.  
  2117.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  2118.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  2119. echo "configure:2120: checking for dnet_ntoa in -ldnet_stub" >&5
  2120. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2121. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2122.   echo $ac_n "(cached) $ac_c" 1>&6
  2123. else
  2124.   ac_save_LIBS="$LIBS"
  2125. LIBS="-ldnet_stub  $LIBS"
  2126. cat > conftest.$ac_ext <<EOF
  2127. #line 2128 "configure"
  2128. #include "confdefs.h"
  2129. /* Override any gcc2 internal prototype to avoid an error.  */
  2130. /* We use char because int might match the return type of a gcc2
  2131.     builtin and then its argument prototype would still apply.  */
  2132. char dnet_ntoa();
  2133.  
  2134. int main() {
  2135. dnet_ntoa()
  2136. ; return 0; }
  2137. EOF
  2138. if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2139.   rm -rf conftest*
  2140.   eval "ac_cv_lib_$ac_lib_var=yes"
  2141. else
  2142.   echo "configure: failed program was:" >&5
  2143.   cat conftest.$ac_ext >&5
  2144.   rm -rf conftest*
  2145.   eval "ac_cv_lib_$ac_lib_var=no"
  2146. fi
  2147. rm -f conftest*
  2148. LIBS="$ac_save_LIBS"
  2149.  
  2150. fi
  2151. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2152.   echo "$ac_t""yes" 1>&6
  2153.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  2154. else
  2155.   echo "$ac_t""no" 1>&6
  2156. fi
  2157.  
  2158.     fi
  2159.  
  2160.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  2161.     # to get the SysV transport functions.
  2162.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  2163.     # needs -lnsl.
  2164.     # The nsl library prevents programs from opening the X display
  2165.     # on Irix 5.2, according to dickey@clark.net.
  2166.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2167. echo "configure:2168: checking for gethostbyname" >&5
  2168. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2169.   echo $ac_n "(cached) $ac_c" 1>&6
  2170. else
  2171.   cat > conftest.$ac_ext <<EOF
  2172. #line 2173 "configure"
  2173. #include "confdefs.h"
  2174. /* System header to define __stub macros and hopefully few prototypes,
  2175.     which can conflict with char gethostbyname(); below.  */
  2176. #include <assert.h>
  2177. /* Override any gcc2 internal prototype to avoid an error.  */
  2178. /* We use char because int might match the return type of a gcc2
  2179.     builtin and then its argument prototype would still apply.  */
  2180. char gethostbyname();
  2181.  
  2182. int main() {
  2183.  
  2184. /* The GNU C library defines this for functions which it implements
  2185.     to always fail with ENOSYS.  Some functions are actually named
  2186.     something starting with __ and the normal name is an alias.  */
  2187. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  2188. choke me
  2189. #else
  2190. gethostbyname();
  2191. #endif
  2192.  
  2193. ; return 0; }
  2194. EOF
  2195. if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2196.   rm -rf conftest*
  2197.   eval "ac_cv_func_gethostbyname=yes"
  2198. else
  2199.   echo "configure: failed program was:" >&5
  2200.   cat conftest.$ac_ext >&5
  2201.   rm -rf conftest*
  2202.   eval "ac_cv_func_gethostbyname=no"
  2203. fi
  2204. rm -f conftest*
  2205. fi
  2206.  
  2207. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  2208.   echo "$ac_t""yes" 1>&6
  2209.   :
  2210. else
  2211.   echo "$ac_t""no" 1>&6
  2212. fi
  2213.  
  2214.     if test $ac_cv_func_gethostbyname = no; then
  2215.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  2216. echo "configure:2217: checking for gethostbyname in -lnsl" >&5
  2217. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  2218. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2219.   echo $ac_n "(cached) $ac_c" 1>&6
  2220. else
  2221.   ac_save_LIBS="$LIBS"
  2222. LIBS="-lnsl  $LIBS"
  2223. cat > conftest.$ac_ext <<EOF
  2224. #line 2225 "configure"
  2225. #include "confdefs.h"
  2226. /* Override any gcc2 internal prototype to avoid an error.  */
  2227. /* We use char because int might match the return type of a gcc2
  2228.     builtin and then its argument prototype would still apply.  */
  2229. char gethostbyname();
  2230.  
  2231. int main() {
  2232. gethostbyname()
  2233. ; return 0; }
  2234. EOF
  2235. if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2236.   rm -rf conftest*
  2237.   eval "ac_cv_lib_$ac_lib_var=yes"
  2238. else
  2239.   echo "configure: failed program was:" >&5
  2240.   cat conftest.$ac_ext >&5
  2241.   rm -rf conftest*
  2242.   eval "ac_cv_lib_$ac_lib_var=no"
  2243. fi
  2244. rm -f conftest*
  2245. LIBS="$ac_save_LIBS"
  2246.  
  2247. fi
  2248. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2249.   echo "$ac_t""yes" 1>&6
  2250.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  2251. else
  2252.   echo "$ac_t""no" 1>&6
  2253. fi
  2254.  
  2255.     fi
  2256.  
  2257.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  2258.     # socket/setsockopt and other routines are undefined under SCO ODT
  2259.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  2260.     # on later versions), says simon@lia.di.epfl.ch: it contains
  2261.     # gethostby* variants that don't use the nameserver (or something).
  2262.     # -lsocket must be given before -lnsl if both are needed.
  2263.     # We assume that if connect needs -lnsl, so does gethostbyname.
  2264.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  2265. echo "configure:2266: checking for connect" >&5
  2266. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2267.   echo $ac_n "(cached) $ac_c" 1>&6
  2268. else
  2269.   cat > conftest.$ac_ext <<EOF
  2270. #line 2271 "configure"
  2271. #include "confdefs.h"
  2272. /* System header to define __stub macros and hopefully few prototypes,
  2273.     which can conflict with char connect(); below.  */
  2274. #include <assert.h>
  2275. /* Override any gcc2 internal prototype to avoid an error.  */
  2276. /* We use char because int might match the return type of a gcc2
  2277.     builtin and then its argument prototype would still apply.  */
  2278. char connect();
  2279.  
  2280. int main() {
  2281.  
  2282. /* The GNU C library defines this for functions which it implements
  2283.     to always fail with ENOSYS.  Some functions are actually named
  2284.     something starting with __ and the normal name is an alias.  */
  2285. #if defined (__stub_connect) || defined (__stub___connect)
  2286. choke me
  2287. #else
  2288. connect();
  2289. #endif
  2290.  
  2291. ; return 0; }
  2292. EOF
  2293. if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2294.   rm -rf conftest*
  2295.   eval "ac_cv_func_connect=yes"
  2296. else
  2297.   echo "configure: failed program was:" >&5
  2298.   cat conftest.$ac_ext >&5
  2299.   rm -rf conftest*
  2300.   eval "ac_cv_func_connect=no"
  2301. fi
  2302. rm -f conftest*
  2303. fi
  2304.  
  2305. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  2306.   echo "$ac_t""yes" 1>&6
  2307.   :
  2308. else
  2309.   echo "$ac_t""no" 1>&6
  2310. fi
  2311.  
  2312.     if test $ac_cv_func_connect = no; then
  2313.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  2314. echo "configure:2315: checking for connect in -lsocket" >&5
  2315. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  2316. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2317.   echo $ac_n "(cached) $ac_c" 1>&6
  2318. else
  2319.   ac_save_LIBS="$LIBS"
  2320. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  2321. cat > conftest.$ac_ext <<EOF
  2322. #line 2323 "configure"
  2323. #include "confdefs.h"
  2324. /* Override any gcc2 internal prototype to avoid an error.  */
  2325. /* We use char because int might match the return type of a gcc2
  2326.     builtin and then its argument prototype would still apply.  */
  2327. char connect();
  2328.  
  2329. int main() {
  2330. connect()
  2331. ; return 0; }
  2332. EOF
  2333. if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2334.   rm -rf conftest*
  2335.   eval "ac_cv_lib_$ac_lib_var=yes"
  2336. else
  2337.   echo "configure: failed program was:" >&5
  2338.   cat conftest.$ac_ext >&5
  2339.   rm -rf conftest*
  2340.   eval "ac_cv_lib_$ac_lib_var=no"
  2341. fi
  2342. rm -f conftest*
  2343. LIBS="$ac_save_LIBS"
  2344.  
  2345. fi
  2346. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2347.   echo "$ac_t""yes" 1>&6
  2348.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  2349. else
  2350.   echo "$ac_t""no" 1>&6
  2351. fi
  2352.  
  2353.     fi
  2354.  
  2355.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  2356.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  2357. echo "configure:2358: checking for remove" >&5
  2358. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  2359.   echo $ac_n "(cached) $ac_c" 1>&6
  2360. else
  2361.   cat > conftest.$ac_ext <<EOF
  2362. #line 2363 "configure"
  2363. #include "confdefs.h"
  2364. /* System header to define __stub macros and hopefully few prototypes,
  2365.     which can conflict with char remove(); below.  */
  2366. #include <assert.h>
  2367. /* Override any gcc2 internal prototype to avoid an error.  */
  2368. /* We use char because int might match the return type of a gcc2
  2369.     builtin and then its argument prototype would still apply.  */
  2370. char remove();
  2371.  
  2372. int main() {
  2373.  
  2374. /* The GNU C library defines this for functions which it implements
  2375.     to always fail with ENOSYS.  Some functions are actually named
  2376.     something starting with __ and the normal name is an alias.  */
  2377. #if defined (__stub_remove) || defined (__stub___remove)
  2378. choke me
  2379. #else
  2380. remove();
  2381. #endif
  2382.  
  2383. ; return 0; }
  2384. EOF
  2385. if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2386.   rm -rf conftest*
  2387.   eval "ac_cv_func_remove=yes"
  2388. else
  2389.   echo "configure: failed program was:" >&5
  2390.   cat conftest.$ac_ext >&5
  2391.   rm -rf conftest*
  2392.   eval "ac_cv_func_remove=no"
  2393. fi
  2394. rm -f conftest*
  2395. fi
  2396.  
  2397. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  2398.   echo "$ac_t""yes" 1>&6
  2399.   :
  2400. else
  2401.   echo "$ac_t""no" 1>&6
  2402. fi
  2403.  
  2404.     if test $ac_cv_func_remove = no; then
  2405.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  2406. echo "configure:2407: checking for remove in -lposix" >&5
  2407. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  2408. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2409.   echo $ac_n "(cached) $ac_c" 1>&6
  2410. else
  2411.   ac_save_LIBS="$LIBS"
  2412. LIBS="-lposix  $LIBS"
  2413. cat > conftest.$ac_ext <<EOF
  2414. #line 2415 "configure"
  2415. #include "confdefs.h"
  2416. /* Override any gcc2 internal prototype to avoid an error.  */
  2417. /* We use char because int might match the return type of a gcc2
  2418.     builtin and then its argument prototype would still apply.  */
  2419. char remove();
  2420.  
  2421. int main() {
  2422. remove()
  2423. ; return 0; }
  2424. EOF
  2425. if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2426.   rm -rf conftest*
  2427.   eval "ac_cv_lib_$ac_lib_var=yes"
  2428. else
  2429.   echo "configure: failed program was:" >&5
  2430.   cat conftest.$ac_ext >&5
  2431.   rm -rf conftest*
  2432.   eval "ac_cv_lib_$ac_lib_var=no"
  2433. fi
  2434. rm -f conftest*
  2435. LIBS="$ac_save_LIBS"
  2436.  
  2437. fi
  2438. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2439.   echo "$ac_t""yes" 1>&6
  2440.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  2441. else
  2442.   echo "$ac_t""no" 1>&6
  2443. fi
  2444.  
  2445.     fi
  2446.  
  2447.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  2448.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  2449. echo "configure:2450: checking for shmat" >&5
  2450. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  2451.   echo $ac_n "(cached) $ac_c" 1>&6
  2452. else
  2453.   cat > conftest.$ac_ext <<EOF
  2454. #line 2455 "configure"
  2455. #include "confdefs.h"
  2456. /* System header to define __stub macros and hopefully few prototypes,
  2457.     which can conflict with char shmat(); below.  */
  2458. #include <assert.h>
  2459. /* Override any gcc2 internal prototype to avoid an error.  */
  2460. /* We use char because int might match the return type of a gcc2
  2461.     builtin and then its argument prototype would still apply.  */
  2462. char shmat();
  2463.  
  2464. int main() {
  2465.  
  2466. /* The GNU C library defines this for functions which it implements
  2467.     to always fail with ENOSYS.  Some functions are actually named
  2468.     something starting with __ and the normal name is an alias.  */
  2469. #if defined (__stub_shmat) || defined (__stub___shmat)
  2470. choke me
  2471. #else
  2472. shmat();
  2473. #endif
  2474.  
  2475. ; return 0; }
  2476. EOF
  2477. if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2478.   rm -rf conftest*
  2479.   eval "ac_cv_func_shmat=yes"
  2480. else
  2481.   echo "configure: failed program was:" >&5
  2482.   cat conftest.$ac_ext >&5
  2483.   rm -rf conftest*
  2484.   eval "ac_cv_func_shmat=no"
  2485. fi
  2486. rm -f conftest*
  2487. fi
  2488.  
  2489. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  2490.   echo "$ac_t""yes" 1>&6
  2491.   :
  2492. else
  2493.   echo "$ac_t""no" 1>&6
  2494. fi
  2495.  
  2496.     if test $ac_cv_func_shmat = no; then
  2497.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  2498. echo "configure:2499: checking for shmat in -lipc" >&5
  2499. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  2500. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2501.   echo $ac_n "(cached) $ac_c" 1>&6
  2502. else
  2503.   ac_save_LIBS="$LIBS"
  2504. LIBS="-lipc  $LIBS"
  2505. cat > conftest.$ac_ext <<EOF
  2506. #line 2507 "configure"
  2507. #include "confdefs.h"
  2508. /* Override any gcc2 internal prototype to avoid an error.  */
  2509. /* We use char because int might match the return type of a gcc2
  2510.     builtin and then its argument prototype would still apply.  */
  2511. char shmat();
  2512.  
  2513. int main() {
  2514. shmat()
  2515. ; return 0; }
  2516. EOF
  2517. if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2518.   rm -rf conftest*
  2519.   eval "ac_cv_lib_$ac_lib_var=yes"
  2520. else
  2521.   echo "configure: failed program was:" >&5
  2522.   cat conftest.$ac_ext >&5
  2523.   rm -rf conftest*
  2524.   eval "ac_cv_lib_$ac_lib_var=no"
  2525. fi
  2526. rm -f conftest*
  2527. LIBS="$ac_save_LIBS"
  2528.  
  2529. fi
  2530. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2531.   echo "$ac_t""yes" 1>&6
  2532.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  2533. else
  2534.   echo "$ac_t""no" 1>&6
  2535. fi
  2536.  
  2537.     fi
  2538.   fi
  2539.  
  2540.   # Check for libraries that X11R6 Xt/Xaw programs need.
  2541.   ac_save_LDFLAGS="$LDFLAGS"
  2542.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  2543.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  2544.   # check for ICE first), but we must link in the order -lSM -lICE or
  2545.   # we get undefined symbols.  So assume we have SM if we have ICE.
  2546.   # These have to be linked with before -lX11, unlike the other
  2547.   # libraries we check for below, so use a different variable.
  2548.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  2549.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  2550. echo "configure:2551: checking for IceConnectionNumber in -lICE" >&5
  2551. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  2552. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2553.   echo $ac_n "(cached) $ac_c" 1>&6
  2554. else
  2555.   ac_save_LIBS="$LIBS"
  2556. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  2557. cat > conftest.$ac_ext <<EOF
  2558. #line 2559 "configure"
  2559. #include "confdefs.h"
  2560. /* Override any gcc2 internal prototype to avoid an error.  */
  2561. /* We use char because int might match the return type of a gcc2
  2562.     builtin and then its argument prototype would still apply.  */
  2563. char IceConnectionNumber();
  2564.  
  2565. int main() {
  2566. IceConnectionNumber()
  2567. ; return 0; }
  2568. EOF
  2569. if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2570.   rm -rf conftest*
  2571.   eval "ac_cv_lib_$ac_lib_var=yes"
  2572. else
  2573.   echo "configure: failed program was:" >&5
  2574.   cat conftest.$ac_ext >&5
  2575.   rm -rf conftest*
  2576.   eval "ac_cv_lib_$ac_lib_var=no"
  2577. fi
  2578. rm -f conftest*
  2579. LIBS="$ac_save_LIBS"
  2580.  
  2581. fi
  2582. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2583.   echo "$ac_t""yes" 1>&6
  2584.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  2585. else
  2586.   echo "$ac_t""no" 1>&6
  2587. fi
  2588.  
  2589.   LDFLAGS="$ac_save_LDFLAGS"
  2590.  
  2591. fi
  2592.  
  2593.  
  2594. if test $ac_cv_lib_nsl_gethostbyname = no; then
  2595.   echo $ac_n "checking for gethostbyname in -lbsd""... $ac_c" 1>&6
  2596. echo "configure:2597: checking for gethostbyname in -lbsd" >&5
  2597. ac_lib_var=`echo bsd'_'gethostbyname | sed 'y%./+-%__p_%'`
  2598. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2599.   echo $ac_n "(cached) $ac_c" 1>&6
  2600. else
  2601.   ac_save_LIBS="$LIBS"
  2602. LIBS="-lbsd  $LIBS"
  2603. cat > conftest.$ac_ext <<EOF
  2604. #line 2605 "configure"
  2605. #include "confdefs.h"
  2606. /* Override any gcc2 internal prototype to avoid an error.  */
  2607. /* We use char because int might match the return type of a gcc2
  2608.     builtin and then its argument prototype would still apply.  */
  2609. char gethostbyname();
  2610.  
  2611. int main() {
  2612. gethostbyname()
  2613. ; return 0; }
  2614. EOF
  2615. if { (eval echo configure:2616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2616.   rm -rf conftest*
  2617.   eval "ac_cv_lib_$ac_lib_var=yes"
  2618. else
  2619.   echo "configure: failed program was:" >&5
  2620.   cat conftest.$ac_ext >&5
  2621.   rm -rf conftest*
  2622.   eval "ac_cv_lib_$ac_lib_var=no"
  2623. fi
  2624. rm -f conftest*
  2625. LIBS="$ac_save_LIBS"
  2626.  
  2627. fi
  2628. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2629.   echo "$ac_t""yes" 1>&6
  2630.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
  2631. else
  2632.   echo "$ac_t""no" 1>&6
  2633. fi
  2634.  
  2635. fi
  2636.  
  2637. if test "$no_x" != yes; then
  2638.   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  2639.   X_LIBRARIES="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
  2640.   GNUPLOT_X11=gnuplot_x11
  2641.   cat >> confdefs.h <<\EOF
  2642. #define X11 1
  2643. EOF
  2644.  
  2645. fi
  2646.  
  2647.  
  2648. echo $ac_n "checking for MS-DOS/djgpp/libGRX""... $ac_c" 1>&6
  2649. echo "configure:2650: checking for MS-DOS/djgpp/libGRX" >&5
  2650. cat > conftest.$ac_ext <<EOF
  2651. #line 2652 "configure"
  2652. #include "confdefs.h"
  2653. #if __DJGPP__ && __DJGPP__ == 2
  2654.   yes
  2655. #endif
  2656.  
  2657. EOF
  2658. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2659.   egrep "yes" >/dev/null 2>&1; then
  2660.   rm -rf conftest*
  2661.   echo "$ac_t""yes" 1>&6
  2662.   LIBS="-lpc $LIBS"
  2663.   cat >> confdefs.h <<\EOF
  2664. #define MSDOS 1
  2665. EOF
  2666.  
  2667.   cat >> confdefs.h <<\EOF
  2668. #define DOS32 1
  2669. EOF
  2670.  
  2671.   with_linux_vga=no
  2672.   echo $ac_n "checking for GrLine in -lgrx20""... $ac_c" 1>&6
  2673. echo "configure:2674: checking for GrLine in -lgrx20" >&5
  2674. ac_lib_var=`echo grx20'_'GrLine | sed 'y%./+-%__p_%'`
  2675. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2676.   echo $ac_n "(cached) $ac_c" 1>&6
  2677. else
  2678.   ac_save_LIBS="$LIBS"
  2679. LIBS="-lgrx20  $LIBS"
  2680. cat > conftest.$ac_ext <<EOF
  2681. #line 2682 "configure"
  2682. #include "confdefs.h"
  2683. /* Override any gcc2 internal prototype to avoid an error.  */
  2684. /* We use char because int might match the return type of a gcc2
  2685.     builtin and then its argument prototype would still apply.  */
  2686. char GrLine();
  2687.  
  2688. int main() {
  2689. GrLine()
  2690. ; return 0; }
  2691. EOF
  2692. if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2693.   rm -rf conftest*
  2694.   eval "ac_cv_lib_$ac_lib_var=yes"
  2695. else
  2696.   echo "configure: failed program was:" >&5
  2697.   cat conftest.$ac_ext >&5
  2698.   rm -rf conftest*
  2699.   eval "ac_cv_lib_$ac_lib_var=no"
  2700. fi
  2701. rm -f conftest*
  2702. LIBS="$ac_save_LIBS"
  2703.  
  2704. fi
  2705. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2706.   echo "$ac_t""yes" 1>&6
  2707.       LIBS="-lgrx20 $LIBS"
  2708.     CFLAGS="$CFLAGS -fno-inline-functions"
  2709.     cat >> confdefs.h <<\EOF
  2710. #define DJSVGA 1
  2711. EOF
  2712.  
  2713.     echo $ac_n "checking for GrCustomLine in -lgrx20""... $ac_c" 1>&6
  2714. echo "configure:2715: checking for GrCustomLine in -lgrx20" >&5
  2715. ac_lib_var=`echo grx20'_'GrCustomLine | sed 'y%./+-%__p_%'`
  2716. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2717.   echo $ac_n "(cached) $ac_c" 1>&6
  2718. else
  2719.   ac_save_LIBS="$LIBS"
  2720. LIBS="-lgrx20  $LIBS"
  2721. cat > conftest.$ac_ext <<EOF
  2722. #line 2723 "configure"
  2723. #include "confdefs.h"
  2724. /* Override any gcc2 internal prototype to avoid an error.  */
  2725. /* We use char because int might match the return type of a gcc2
  2726.     builtin and then its argument prototype would still apply.  */
  2727. char GrCustomLine();
  2728.  
  2729. int main() {
  2730. GrCustomLine()
  2731. ; return 0; }
  2732. EOF
  2733. if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2734.   rm -rf conftest*
  2735.   eval "ac_cv_lib_$ac_lib_var=yes"
  2736. else
  2737.   echo "configure: failed program was:" >&5
  2738.   cat conftest.$ac_ext >&5
  2739.   rm -rf conftest*
  2740.   eval "ac_cv_lib_$ac_lib_var=no"
  2741. fi
  2742. rm -f conftest*
  2743. LIBS="$ac_save_LIBS"
  2744.  
  2745. fi
  2746. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2747.   echo "$ac_t""yes" 1>&6
  2748.         cat >> confdefs.h <<\EOF
  2749. #define GRX21 1
  2750. EOF
  2751.     
  2752. else
  2753.   echo "$ac_t""no" 1>&6
  2754. fi
  2755.   
  2756. else
  2757.   echo "$ac_t""no" 1>&6
  2758. fi
  2759.  
  2760. else
  2761.   rm -rf conftest*
  2762.     echo "$ac_t""no" 1>&6
  2763.   
  2764. fi
  2765. rm -f conftest*
  2766.  
  2767. echo $ac_n "checking for NeXT""... $ac_c" 1>&6
  2768. echo "configure:2769: checking for NeXT" >&5
  2769. cat > conftest.$ac_ext <<EOF
  2770. #line 2771 "configure"
  2771. #include "confdefs.h"
  2772. #if __NeXT__
  2773.   yes
  2774. #endif
  2775.  
  2776. EOF
  2777. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2778.   egrep "yes" >/dev/null 2>&1; then
  2779.   rm -rf conftest*
  2780.   echo "$ac_t""yes" 1>&6
  2781.    LIBS="$LIBS -lsys_s -lNeXT_s"
  2782.    CFLAGS="$CFLAGS -ObjC"
  2783. else
  2784.   rm -rf conftest*
  2785.      echo "$ac_t""no" 1>&6
  2786. fi
  2787. rm -f conftest*
  2788.  
  2789.  
  2790.  
  2791. echo $ac_n "checking for sin""... $ac_c" 1>&6
  2792. echo "configure:2793: checking for sin" >&5
  2793. if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  2794.   echo $ac_n "(cached) $ac_c" 1>&6
  2795. else
  2796.   cat > conftest.$ac_ext <<EOF
  2797. #line 2798 "configure"
  2798. #include "confdefs.h"
  2799. /* System header to define __stub macros and hopefully few prototypes,
  2800.     which can conflict with char sin(); below.  */
  2801. #include <assert.h>
  2802. /* Override any gcc2 internal prototype to avoid an error.  */
  2803. /* We use char because int might match the return type of a gcc2
  2804.     builtin and then its argument prototype would still apply.  */
  2805. char sin();
  2806.  
  2807. int main() {
  2808.  
  2809. /* The GNU C library defines this for functions which it implements
  2810.     to always fail with ENOSYS.  Some functions are actually named
  2811.     something starting with __ and the normal name is an alias.  */
  2812. #if defined (__stub_sin) || defined (__stub___sin)
  2813. choke me
  2814. #else
  2815. sin();
  2816. #endif
  2817.  
  2818. ; return 0; }
  2819. EOF
  2820. if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2821.   rm -rf conftest*
  2822.   eval "ac_cv_func_sin=yes"
  2823. else
  2824.   echo "configure: failed program was:" >&5
  2825.   cat conftest.$ac_ext >&5
  2826.   rm -rf conftest*
  2827.   eval "ac_cv_func_sin=no"
  2828. fi
  2829. rm -f conftest*
  2830. fi
  2831.  
  2832. if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  2833.   echo "$ac_t""yes" 1>&6
  2834.   :
  2835. else
  2836.   echo "$ac_t""no" 1>&6
  2837. fi
  2838.  
  2839. if test "$ac_cv_func_sin" = no ; then
  2840.   echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
  2841. echo "configure:2842: checking for sin in -lm" >&5
  2842. ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
  2843. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2844.   echo $ac_n "(cached) $ac_c" 1>&6
  2845. else
  2846.   ac_save_LIBS="$LIBS"
  2847. LIBS="-lm  $LIBS"
  2848. cat > conftest.$ac_ext <<EOF
  2849. #line 2850 "configure"
  2850. #include "confdefs.h"
  2851. /* Override any gcc2 internal prototype to avoid an error.  */
  2852. /* We use char because int might match the return type of a gcc2
  2853.     builtin and then its argument prototype would still apply.  */
  2854. char sin();
  2855.  
  2856. int main() {
  2857. sin()
  2858. ; return 0; }
  2859. EOF
  2860. if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2861.   rm -rf conftest*
  2862.   eval "ac_cv_lib_$ac_lib_var=yes"
  2863. else
  2864.   echo "configure: failed program was:" >&5
  2865.   cat conftest.$ac_ext >&5
  2866.   rm -rf conftest*
  2867.   eval "ac_cv_lib_$ac_lib_var=no"
  2868. fi
  2869. rm -f conftest*
  2870. LIBS="$ac_save_LIBS"
  2871.  
  2872. fi
  2873. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2874.   echo "$ac_t""yes" 1>&6
  2875.     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2876.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2877.   cat >> confdefs.h <<EOF
  2878. #define $ac_tr_lib 1
  2879. EOF
  2880.  
  2881.   LIBS="-lm $LIBS"
  2882.  
  2883. else
  2884.   echo "$ac_t""no" 1>&6
  2885. fi
  2886.  
  2887. fi
  2888. dnlLIBS="$LIBS -lm"
  2889.  
  2890.  
  2891. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2892. echo "configure:2893: checking for ANSI C header files" >&5
  2893. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  2894.   echo $ac_n "(cached) $ac_c" 1>&6
  2895. else
  2896.   cat > conftest.$ac_ext <<EOF
  2897. #line 2898 "configure"
  2898. #include "confdefs.h"
  2899. #include <stdlib.h>
  2900. #include <stdarg.h>
  2901. #include <string.h>
  2902. #include <float.h>
  2903. EOF
  2904. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2905. { (eval echo configure:2906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2906. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2907. if test -z "$ac_err"; then
  2908.   rm -rf conftest*
  2909.   ac_cv_header_stdc=yes
  2910. else
  2911.   echo "$ac_err" >&5
  2912.   echo "configure: failed program was:" >&5
  2913.   cat conftest.$ac_ext >&5
  2914.   rm -rf conftest*
  2915.   ac_cv_header_stdc=no
  2916. fi
  2917. rm -f conftest*
  2918.  
  2919. if test $ac_cv_header_stdc = yes; then
  2920.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2921. cat > conftest.$ac_ext <<EOF
  2922. #line 2923 "configure"
  2923. #include "confdefs.h"
  2924. #include <string.h>
  2925. EOF
  2926. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2927.   egrep "memchr" >/dev/null 2>&1; then
  2928.   :
  2929. else
  2930.   rm -rf conftest*
  2931.   ac_cv_header_stdc=no
  2932. fi
  2933. rm -f conftest*
  2934.  
  2935. fi
  2936.  
  2937. if test $ac_cv_header_stdc = yes; then
  2938.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2939. cat > conftest.$ac_ext <<EOF
  2940. #line 2941 "configure"
  2941. #include "confdefs.h"
  2942. #include <stdlib.h>
  2943. EOF
  2944. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2945.   egrep "free" >/dev/null 2>&1; then
  2946.   :
  2947. else
  2948.   rm -rf conftest*
  2949.   ac_cv_header_stdc=no
  2950. fi
  2951. rm -f conftest*
  2952.  
  2953. fi
  2954.  
  2955. if test $ac_cv_header_stdc = yes; then
  2956.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2957. if test "$cross_compiling" = yes; then
  2958.   :
  2959. else
  2960.   cat > conftest.$ac_ext <<EOF
  2961. #line 2962 "configure"
  2962. #include "confdefs.h"
  2963. #include <ctype.h>
  2964. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2965. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2966. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2967. int main () { int i; for (i = 0; i < 256; i++)
  2968. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2969. exit (0); }
  2970.  
  2971. EOF
  2972. if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2973. then
  2974.   :
  2975. else
  2976.   echo "configure: failed program was:" >&5
  2977.   cat conftest.$ac_ext >&5
  2978.   rm -fr conftest*
  2979.   ac_cv_header_stdc=no
  2980. fi
  2981. rm -fr conftest*
  2982. fi
  2983.  
  2984. fi
  2985. fi
  2986.  
  2987. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2988. if test $ac_cv_header_stdc = yes; then
  2989.   cat >> confdefs.h <<\EOF
  2990. #define STDC_HEADERS 1
  2991. EOF
  2992.  
  2993. fi
  2994.  
  2995.  
  2996. for ac_hdr in errno.h float.h limits.h locale.h math.h stdlib.h string.h \
  2997.   time.h sys/time.h sys/timeb.h sys/types.h
  2998. do
  2999. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3000. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3001. echo "configure:3002: checking for $ac_hdr" >&5
  3002. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3003.   echo $ac_n "(cached) $ac_c" 1>&6
  3004. else
  3005.   cat > conftest.$ac_ext <<EOF
  3006. #line 3007 "configure"
  3007. #include "confdefs.h"
  3008. #include <$ac_hdr>
  3009. EOF
  3010. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3011. { (eval echo configure:3012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3012. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3013. if test -z "$ac_err"; then
  3014.   rm -rf conftest*
  3015.   eval "ac_cv_header_$ac_safe=yes"
  3016. else
  3017.   echo "$ac_err" >&5
  3018.   echo "configure: failed program was:" >&5
  3019.   cat conftest.$ac_ext >&5
  3020.   rm -rf conftest*
  3021.   eval "ac_cv_header_$ac_safe=no"
  3022. fi
  3023. rm -f conftest*
  3024. fi
  3025. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3026.   echo "$ac_t""yes" 1>&6
  3027.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3028.   cat >> confdefs.h <<EOF
  3029. #define $ac_tr_hdr 1
  3030. EOF
  3031.  
  3032. else
  3033.   echo "$ac_t""no" 1>&6
  3034. fi
  3035. done
  3036.  
  3037. for ac_hdr in sys/bsdtypes.h sys/select.h sys/socket.h sys/stat.h \
  3038.   sys/systeminfo.h sys/utsname.h libc.h malloc.h sgtty.h termios.h values.h
  3039. do
  3040. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3041. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3042. echo "configure:3043: checking for $ac_hdr" >&5
  3043. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3044.   echo $ac_n "(cached) $ac_c" 1>&6
  3045. else
  3046.   cat > conftest.$ac_ext <<EOF
  3047. #line 3048 "configure"
  3048. #include "confdefs.h"
  3049. #include <$ac_hdr>
  3050. EOF
  3051. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3052. { (eval echo configure:3053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3053. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3054. if test -z "$ac_err"; then
  3055.   rm -rf conftest*
  3056.   eval "ac_cv_header_$ac_safe=yes"
  3057. else
  3058.   echo "$ac_err" >&5
  3059.   echo "configure: failed program was:" >&5
  3060.   cat conftest.$ac_ext >&5
  3061.   rm -rf conftest*
  3062.   eval "ac_cv_header_$ac_safe=no"
  3063. fi
  3064. rm -f conftest*
  3065. fi
  3066. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3067.   echo "$ac_t""yes" 1>&6
  3068.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3069.   cat >> confdefs.h <<EOF
  3070. #define $ac_tr_hdr 1
  3071. EOF
  3072.  
  3073. else
  3074.   echo "$ac_t""no" 1>&6
  3075. fi
  3076. done
  3077.  
  3078. test "$ac_cv_header_sys_stat_h" = yes && echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  3079. echo "configure:3080: checking whether stat file-mode macros are broken" >&5
  3080. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  3081.   echo $ac_n "(cached) $ac_c" 1>&6
  3082. else
  3083.   cat > conftest.$ac_ext <<EOF
  3084. #line 3085 "configure"
  3085. #include "confdefs.h"
  3086. #include <sys/types.h>
  3087. #include <sys/stat.h>
  3088.  
  3089. #if defined(S_ISBLK) && defined(S_IFDIR)
  3090. # if S_ISBLK (S_IFDIR)
  3091. You lose.
  3092. # endif
  3093. #endif
  3094.  
  3095. #if defined(S_ISBLK) && defined(S_IFCHR)
  3096. # if S_ISBLK (S_IFCHR)
  3097. You lose.
  3098. # endif
  3099. #endif
  3100.  
  3101. #if defined(S_ISLNK) && defined(S_IFREG)
  3102. # if S_ISLNK (S_IFREG)
  3103. You lose.
  3104. # endif
  3105. #endif
  3106.  
  3107. #if defined(S_ISSOCK) && defined(S_IFREG)
  3108. # if S_ISSOCK (S_IFREG)
  3109. You lose.
  3110. # endif
  3111. #endif
  3112.  
  3113. EOF
  3114. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3115.   egrep "You lose" >/dev/null 2>&1; then
  3116.   rm -rf conftest*
  3117.   ac_cv_header_stat_broken=yes
  3118. else
  3119.   rm -rf conftest*
  3120.   ac_cv_header_stat_broken=no
  3121. fi
  3122. rm -f conftest*
  3123.  
  3124. fi
  3125.  
  3126. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  3127. if test $ac_cv_header_stat_broken = yes; then
  3128.   cat >> confdefs.h <<\EOF
  3129. #define STAT_MACROS_BROKEN 1
  3130. EOF
  3131.  
  3132. fi
  3133.  
  3134.  
  3135. echo $ac_n "checking for unistd.h""... $ac_c" 1>&6
  3136. echo "configure:3137: checking for unistd.h" >&5
  3137. cat > conftest.$ac_ext <<EOF
  3138. #line 3139 "configure"
  3139. #include "confdefs.h"
  3140. #include <unistd.h>
  3141. EOF
  3142. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3143.   egrep "execv" >/dev/null 2>&1; then
  3144.   rm -rf conftest*
  3145.   cat >> confdefs.h <<\EOF
  3146. #define HAVE_UNISTD_H 1
  3147. EOF
  3148.  echo "$ac_t""yes" 1>&6
  3149. else
  3150.   rm -rf conftest*
  3151.   echo "$ac_t""no" 1>&6
  3152. fi
  3153. rm -f conftest*
  3154.  
  3155.  
  3156. echo $ac_n "checking if errno variable is declared""... $ac_c" 1>&6
  3157. echo "configure:3158: checking if errno variable is declared" >&5
  3158. cat > conftest.$ac_ext <<EOF
  3159. #line 3160 "configure"
  3160. #include "confdefs.h"
  3161. #include <stdio.h>
  3162. #ifdef HAVE_ERRNO_H
  3163. #include <errno.h>
  3164. #endif
  3165. int main() {
  3166. errno=0
  3167. ; return 0; }
  3168. EOF
  3169. if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3170.   rm -rf conftest*
  3171.   echo "$ac_t""yes" 1>&6
  3172. else
  3173.   echo "configure: failed program was:" >&5
  3174.   cat conftest.$ac_ext >&5
  3175.   rm -rf conftest*
  3176.     cat >> confdefs.h <<\EOF
  3177. #define EXTERN_ERRNO 1
  3178. EOF
  3179.  
  3180.   echo "$ac_t""no" 1>&6
  3181.  
  3182. fi
  3183. rm -f conftest*
  3184.  
  3185. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  3186. echo "configure:3187: checking for size_t" >&5
  3187. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  3188.   echo $ac_n "(cached) $ac_c" 1>&6
  3189. else
  3190.   cat > conftest.$ac_ext <<EOF
  3191. #line 3192 "configure"
  3192. #include "confdefs.h"
  3193. #include <sys/types.h>
  3194. #if STDC_HEADERS
  3195. #include <stdlib.h>
  3196. #include <stddef.h>
  3197. #endif
  3198. EOF
  3199. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3200.   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3201.   rm -rf conftest*
  3202.   ac_cv_type_size_t=yes
  3203. else
  3204.   rm -rf conftest*
  3205.   ac_cv_type_size_t=no
  3206. fi
  3207. rm -f conftest*
  3208.  
  3209. fi
  3210. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  3211. if test $ac_cv_type_size_t = no; then
  3212.   cat >> confdefs.h <<\EOF
  3213. #define size_t unsigned
  3214. EOF
  3215.  
  3216. fi
  3217.  
  3218. echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
  3219. echo "configure:3220: checking for time_t in time.h" >&5
  3220. cat > conftest.$ac_ext <<EOF
  3221. #line 3222 "configure"
  3222. #include "confdefs.h"
  3223. #include <time.h>
  3224. EOF
  3225. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3226.   egrep "time_t" >/dev/null 2>&1; then
  3227.   rm -rf conftest*
  3228.      ac_cv_type_time_t=yes; echo "$ac_t""yes" 1>&6 
  3229. else
  3230.   rm -rf conftest*
  3231.      echo "$ac_t""no" 1>&6 echo $ac_n "checking for time_t""... $ac_c" 1>&6
  3232. echo "configure:3233: checking for time_t" >&5
  3233. if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
  3234.   echo $ac_n "(cached) $ac_c" 1>&6
  3235. else
  3236.   cat > conftest.$ac_ext <<EOF
  3237. #line 3238 "configure"
  3238. #include "confdefs.h"
  3239. #include <sys/types.h>
  3240. #if STDC_HEADERS
  3241. #include <stdlib.h>
  3242. #include <stddef.h>
  3243. #endif
  3244. EOF
  3245. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3246.   egrep "(^|[^a-zA-Z_0-9])time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3247.   rm -rf conftest*
  3248.   ac_cv_type_time_t=yes
  3249. else
  3250.   rm -rf conftest*
  3251.   ac_cv_type_time_t=no
  3252. fi
  3253. rm -f conftest*
  3254.  
  3255. fi
  3256. echo "$ac_t""$ac_cv_type_time_t" 1>&6
  3257. if test $ac_cv_type_time_t = no; then
  3258.   cat >> confdefs.h <<\EOF
  3259. #define time_t long
  3260. EOF
  3261.  
  3262. fi
  3263.  
  3264. fi
  3265. rm -f conftest*
  3266.  
  3267. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  3268. echo "configure:3269: checking return type of signal handlers" >&5
  3269. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  3270.   echo $ac_n "(cached) $ac_c" 1>&6
  3271. else
  3272.   cat > conftest.$ac_ext <<EOF
  3273. #line 3274 "configure"
  3274. #include "confdefs.h"
  3275. #include <sys/types.h>
  3276. #include <signal.h>
  3277. #ifdef signal
  3278. #undef signal
  3279. #endif
  3280. #ifdef __cplusplus
  3281. extern "C" void (*signal (int, void (*)(int)))(int);
  3282. #else
  3283. void (*signal ()) ();
  3284. #endif
  3285.  
  3286. int main() {
  3287. int i;
  3288. ; return 0; }
  3289. EOF
  3290. if { (eval echo configure:3291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3291.   rm -rf conftest*
  3292.   ac_cv_type_signal=void
  3293. else
  3294.   echo "configure: failed program was:" >&5
  3295.   cat conftest.$ac_ext >&5
  3296.   rm -rf conftest*
  3297.   ac_cv_type_signal=int
  3298. fi
  3299. rm -f conftest*
  3300. fi
  3301.  
  3302. echo "$ac_t""$ac_cv_type_signal" 1>&6
  3303. cat >> confdefs.h <<EOF
  3304. #define RETSIGTYPE $ac_cv_type_signal
  3305. EOF
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311. for ac_func in atexit on_exit memcpy memmove memset bcopy bzero setvbuf \
  3312.   strerror strchr index strrchr rindex strstr
  3313. do
  3314. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3315. echo "configure:3316: checking for $ac_func" >&5
  3316. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3317.   echo $ac_n "(cached) $ac_c" 1>&6
  3318. else
  3319.   cat > conftest.$ac_ext <<EOF
  3320. #line 3321 "configure"
  3321. #include "confdefs.h"
  3322. /* System header to define __stub macros and hopefully few prototypes,
  3323.     which can conflict with char $ac_func(); below.  */
  3324. #include <assert.h>
  3325. /* Override any gcc2 internal prototype to avoid an error.  */
  3326. /* We use char because int might match the return type of a gcc2
  3327.     builtin and then its argument prototype would still apply.  */
  3328. char $ac_func();
  3329.  
  3330. int main() {
  3331.  
  3332. /* The GNU C library defines this for functions which it implements
  3333.     to always fail with ENOSYS.  Some functions are actually named
  3334.     something starting with __ and the normal name is an alias.  */
  3335. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3336. choke me
  3337. #else
  3338. $ac_func();
  3339. #endif
  3340.  
  3341. ; return 0; }
  3342. EOF
  3343. if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3344.   rm -rf conftest*
  3345.   eval "ac_cv_func_$ac_func=yes"
  3346. else
  3347.   echo "configure: failed program was:" >&5
  3348.   cat conftest.$ac_ext >&5
  3349.   rm -rf conftest*
  3350.   eval "ac_cv_func_$ac_func=no"
  3351. fi
  3352. rm -f conftest*
  3353. fi
  3354.  
  3355. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3356.   echo "$ac_t""yes" 1>&6
  3357.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3358.   cat >> confdefs.h <<EOF
  3359. #define $ac_tr_func 1
  3360. EOF
  3361.  
  3362. else
  3363.   echo "$ac_t""no" 1>&6
  3364. fi
  3365. done
  3366.  
  3367.  
  3368. for ac_func in erf erfc gamma lgamma getcwd pclose popen sleep snprintf \
  3369.   strncasecmp strnicmp sysinfo tcgetattr
  3370. do
  3371. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3372. echo "configure:3373: checking for $ac_func" >&5
  3373. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3374.   echo $ac_n "(cached) $ac_c" 1>&6
  3375. else
  3376.   cat > conftest.$ac_ext <<EOF
  3377. #line 3378 "configure"
  3378. #include "confdefs.h"
  3379. /* System header to define __stub macros and hopefully few prototypes,
  3380.     which can conflict with char $ac_func(); below.  */
  3381. #include <assert.h>
  3382. /* Override any gcc2 internal prototype to avoid an error.  */
  3383. /* We use char because int might match the return type of a gcc2
  3384.     builtin and then its argument prototype would still apply.  */
  3385. char $ac_func();
  3386.  
  3387. int main() {
  3388.  
  3389. /* The GNU C library defines this for functions which it implements
  3390.     to always fail with ENOSYS.  Some functions are actually named
  3391.     something starting with __ and the normal name is an alias.  */
  3392. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3393. choke me
  3394. #else
  3395. $ac_func();
  3396. #endif
  3397.  
  3398. ; return 0; }
  3399. EOF
  3400. if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3401.   rm -rf conftest*
  3402.   eval "ac_cv_func_$ac_func=yes"
  3403. else
  3404.   echo "configure: failed program was:" >&5
  3405.   cat conftest.$ac_ext >&5
  3406.   rm -rf conftest*
  3407.   eval "ac_cv_func_$ac_func=no"
  3408. fi
  3409. rm -f conftest*
  3410. fi
  3411.  
  3412. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3413.   echo "$ac_t""yes" 1>&6
  3414.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3415.   cat >> confdefs.h <<EOF
  3416. #define $ac_tr_func 1
  3417. EOF
  3418.  
  3419. else
  3420.   echo "$ac_t""no" 1>&6
  3421. fi
  3422. done
  3423.  
  3424. if test "$ac_cv_func_pclose" = yes && test "$ac_cv_func_popen" = yes ; then
  3425.   cat >> confdefs.h <<\EOF
  3426. #define PIPES 1
  3427. EOF
  3428.  
  3429. fi
  3430.  
  3431. for ac_func in select
  3432. do
  3433. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3434. echo "configure:3435: checking for $ac_func" >&5
  3435. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3436.   echo $ac_n "(cached) $ac_c" 1>&6
  3437. else
  3438.   cat > conftest.$ac_ext <<EOF
  3439. #line 3440 "configure"
  3440. #include "confdefs.h"
  3441. /* System header to define __stub macros and hopefully few prototypes,
  3442.     which can conflict with char $ac_func(); below.  */
  3443. #include <assert.h>
  3444. /* Override any gcc2 internal prototype to avoid an error.  */
  3445. /* We use char because int might match the return type of a gcc2
  3446.     builtin and then its argument prototype would still apply.  */
  3447. char $ac_func();
  3448.  
  3449. int main() {
  3450.  
  3451. /* The GNU C library defines this for functions which it implements
  3452.     to always fail with ENOSYS.  Some functions are actually named
  3453.     something starting with __ and the normal name is an alias.  */
  3454. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3455. choke me
  3456. #else
  3457. $ac_func();
  3458. #endif
  3459.  
  3460. ; return 0; }
  3461. EOF
  3462. if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3463.   rm -rf conftest*
  3464.   eval "ac_cv_func_$ac_func=yes"
  3465. else
  3466.   echo "configure: failed program was:" >&5
  3467.   cat conftest.$ac_ext >&5
  3468.   rm -rf conftest*
  3469.   eval "ac_cv_func_$ac_func=no"
  3470. fi
  3471. rm -f conftest*
  3472. fi
  3473.  
  3474. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3475.   echo "$ac_t""yes" 1>&6
  3476.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3477.   cat >> confdefs.h <<EOF
  3478. #define $ac_tr_func 1
  3479. EOF
  3480.  
  3481. else
  3482.   echo "$ac_t""no" 1>&6
  3483. fi
  3484. done
  3485.  
  3486. if test "$ac_cv_func_select" = yes; then
  3487.   for ac_hdr in unistd.h sys/types.h sys/time.h sys/select.h sys/socket.h
  3488. do
  3489. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3490. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3491. echo "configure:3492: checking for $ac_hdr" >&5
  3492. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3493.   echo $ac_n "(cached) $ac_c" 1>&6
  3494. else
  3495.   cat > conftest.$ac_ext <<EOF
  3496. #line 3497 "configure"
  3497. #include "confdefs.h"
  3498. #include <$ac_hdr>
  3499. EOF
  3500. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3501. { (eval echo configure:3502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3502. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3503. if test -z "$ac_err"; then
  3504.   rm -rf conftest*
  3505.   eval "ac_cv_header_$ac_safe=yes"
  3506. else
  3507.   echo "$ac_err" >&5
  3508.   echo "configure: failed program was:" >&5
  3509.   cat conftest.$ac_ext >&5
  3510.   rm -rf conftest*
  3511.   eval "ac_cv_header_$ac_safe=no"
  3512. fi
  3513. rm -f conftest*
  3514. fi
  3515. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3516.   echo "$ac_t""yes" 1>&6
  3517.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3518.   cat >> confdefs.h <<EOF
  3519. #define $ac_tr_hdr 1
  3520. EOF
  3521.  
  3522. else
  3523.   echo "$ac_t""no" 1>&6
  3524. fi
  3525. done
  3526.  
  3527.   echo $ac_n "checking argument types of select()""... $ac_c" 1>&6
  3528. echo "configure:3529: checking argument types of select()" >&5
  3529.   if eval "test \"`echo '$''{'ac_cv_type_fd_set_size_t'+set}'`\" = set"; then
  3530.   echo $ac_n "(cached) $ac_c" 1>&6
  3531. else
  3532.       if eval "test \"`echo '$''{'ac_cv_type_fd_set'+set}'`\" = set"; then
  3533.   echo $ac_n "(cached) $ac_c" 1>&6
  3534. else
  3535.         for ac_cv_type_fd_set in 'fd_set' 'int' 'void'; do
  3536.         for ac_cv_type_fd_set_size_t in 'int' 'size_t' 'unsigned long' 'unsigned'; do
  3537.       for ac_type_timeval in 'struct timeval' 'const struct timeval'; do
  3538.             cat > conftest.$ac_ext <<EOF
  3539. #line 3540 "configure"
  3540. #include "confdefs.h"
  3541. #ifdef HAVE_SYS_TIME_H
  3542. #include <sys/time.h>
  3543. #endif
  3544. #ifdef HAVE_SYS_TYPES_H
  3545. #include <sys/types.h>
  3546. #endif
  3547. #ifdef HAVE_UNISTD_H
  3548. #include <unistd.h>
  3549. #endif
  3550. #ifdef HAVE_SYS_SELECT_H
  3551. #include <sys/select.h>
  3552. #endif
  3553. #ifdef HAVE_SYS_SOCKET_H
  3554. #include <sys/socket.h>
  3555. #endif
  3556. int main() {
  3557. #ifdef __STDC__
  3558. extern int select ($ac_cv_type_fd_set_size_t, 
  3559.  $ac_cv_type_fd_set *,    $ac_cv_type_fd_set *, $ac_cv_type_fd_set *,
  3560.  $ac_type_timeval *);
  3561. #else
  3562. extern int select ();
  3563.   $ac_cv_type_fd_set_size_t s;
  3564.   $ac_cv_type_fd_set *p;
  3565.   $ac_type_timeval *t;
  3566. #endif
  3567. ; return 0; }
  3568. EOF
  3569. if { (eval echo configure:3570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3570.   rm -rf conftest*
  3571.   ac_found=yes ; break 3
  3572. else
  3573.   echo "configure: failed program was:" >&5
  3574.   cat conftest.$ac_ext >&5
  3575.   rm -rf conftest*
  3576.   ac_found=no
  3577. fi
  3578. rm -f conftest*
  3579.           done
  3580.         done
  3581.       done
  3582.     
  3583. fi
  3584.   
  3585. fi
  3586.   if test "$ac_found" = no; then
  3587.     { echo "configure: error: can't determine argument types" 1>&2; exit 1; }
  3588.   fi
  3589.  
  3590.   echo "$ac_t""select($ac_cv_type_fd_set_size_t,$ac_cv_type_fd_set *,...)" 1>&6
  3591.   cat >> confdefs.h <<EOF
  3592. #define fd_set_size_t $ac_cv_type_fd_set_size_t
  3593. EOF
  3594.  
  3595.   ac_cast=
  3596.   if test "$ac_cv_type_fd_set" != fd_set; then
  3597.     # Arguments 2-4 are not fd_set.  Some weirdo systems use fd_set type for
  3598.     # FD_SET macros, but insist that you cast the argument to select.  I don't
  3599.     # understand why that might be, but it means we cannot define fd_set.
  3600.     cat > conftest.$ac_ext <<EOF
  3601. #line 3602 "configure"
  3602. #include "confdefs.h"
  3603. #ifdef HAVE_SYS_TIME_H
  3604. #include <sys/time.h>
  3605. #endif
  3606. #ifdef HAVE_SYS_TYPES_H
  3607. #include <sys/types.h>
  3608. #endif
  3609. #ifdef HAVE_UNISTD_H
  3610. #include <unistd.h>
  3611. #endif
  3612. #ifdef HAVE_SYS_SELECT_H
  3613. #include <sys/select.h>
  3614. #endif
  3615. #ifdef HAVE_SYS_SOCKET_H
  3616. #include <sys/socket.h>
  3617. #endif
  3618. EOF
  3619. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3620.   egrep "(^|[^a-zA-Z_0-9])fd_set[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3621.   rm -rf conftest*
  3622.       # We found fd_set type in a header, need special cast
  3623.     ac_cast="($ac_cv_type_fd_set *)"
  3624. else
  3625.   rm -rf conftest*
  3626.       # No fd_set type; it is safe to define it
  3627.     cat >> confdefs.h <<EOF
  3628. #define fd_set $ac_cv_type_fd_set
  3629. EOF
  3630.  
  3631. fi
  3632. rm -f conftest*
  3633.  
  3634.   fi
  3635.   cat >> confdefs.h <<EOF
  3636. #define SELECT_FD_SET_CAST $ac_cast
  3637. EOF
  3638.  
  3639. fi
  3640.  
  3641.  
  3642.  
  3643. if test "$with_linux_vga" = yes; then
  3644.   echo $ac_n "checking for linux vga library""... $ac_c" 1>&6
  3645. echo "configure:3646: checking for linux vga library" >&5
  3646.   echo $ac_n "checking for vga_init in -lvga""... $ac_c" 1>&6
  3647. echo "configure:3648: checking for vga_init in -lvga" >&5
  3648. ac_lib_var=`echo vga'_'vga_init | sed 'y%./+-%__p_%'`
  3649. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3650.   echo $ac_n "(cached) $ac_c" 1>&6
  3651. else
  3652.   ac_save_LIBS="$LIBS"
  3653. LIBS="-lvga  $LIBS"
  3654. cat > conftest.$ac_ext <<EOF
  3655. #line 3656 "configure"
  3656. #include "confdefs.h"
  3657. /* Override any gcc2 internal prototype to avoid an error.  */
  3658. /* We use char because int might match the return type of a gcc2
  3659.     builtin and then its argument prototype would still apply.  */
  3660. char vga_init();
  3661.  
  3662. int main() {
  3663. vga_init()
  3664. ; return 0; }
  3665. EOF
  3666. if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3667.   rm -rf conftest*
  3668.   eval "ac_cv_lib_$ac_lib_var=yes"
  3669. else
  3670.   echo "configure: failed program was:" >&5
  3671.   cat conftest.$ac_ext >&5
  3672.   rm -rf conftest*
  3673.   eval "ac_cv_lib_$ac_lib_var=no"
  3674. fi
  3675. rm -f conftest*
  3676. LIBS="$ac_save_LIBS"
  3677.  
  3678. fi
  3679. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3680.   echo "$ac_t""yes" 1>&6
  3681.   cat >> confdefs.h <<\EOF
  3682. #define LINUXVGA 1
  3683. EOF
  3684.  
  3685.      LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot'
  3686.      TERMLIBS="$TERMLIBS -lvga"
  3687. else
  3688.   echo "$ac_t""no" 1>&6
  3689.     with_linux_vga=no
  3690. fi
  3691.  
  3692. fi
  3693.  
  3694. if test "$with_readline" != no; then
  3695.   if test "$with_readline" != yes; then
  3696.             gp_tcap=""
  3697.     for termlib in ncurses curses termcap terminfo termlib; do
  3698.       echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6
  3699. echo "configure:3700: checking for tputs in -l${termlib}" >&5
  3700. ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'`
  3701. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3702.   echo $ac_n "(cached) $ac_c" 1>&6
  3703. else
  3704.   ac_save_LIBS="$LIBS"
  3705. LIBS="-l${termlib}  $LIBS"
  3706. cat > conftest.$ac_ext <<EOF
  3707. #line 3708 "configure"
  3708. #include "confdefs.h"
  3709. /* Override any gcc2 internal prototype to avoid an error.  */
  3710. /* We use char because int might match the return type of a gcc2
  3711.     builtin and then its argument prototype would still apply.  */
  3712. char tputs();
  3713.  
  3714. int main() {
  3715. tputs()
  3716. ; return 0; }
  3717. EOF
  3718. if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3719.   rm -rf conftest*
  3720.   eval "ac_cv_lib_$ac_lib_var=yes"
  3721. else
  3722.   echo "configure: failed program was:" >&5
  3723.   cat conftest.$ac_ext >&5
  3724.   rm -rf conftest*
  3725.   eval "ac_cv_lib_$ac_lib_var=no"
  3726. fi
  3727. rm -f conftest*
  3728. LIBS="$ac_save_LIBS"
  3729.  
  3730. fi
  3731. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3732.   echo "$ac_t""yes" 1>&6
  3733.   gp_tcap="$gp_tcap -l$termlib"
  3734. else
  3735.   echo "$ac_t""no" 1>&6
  3736. fi
  3737.  
  3738.       case "$gp_tcap" in
  3739.         *-l${termlib}*)
  3740.           break
  3741.         ;;
  3742.       esac
  3743.     done
  3744.  
  3745.     if test "$with_readline" = gnu; then
  3746.       echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  3747. echo "configure:3748: checking for readline in -lreadline" >&5
  3748. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  3749. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3750.   echo $ac_n "(cached) $ac_c" 1>&6
  3751. else
  3752.   ac_save_LIBS="$LIBS"
  3753. LIBS="-lreadline ${gp_tcap} $LIBS"
  3754. cat > conftest.$ac_ext <<EOF
  3755. #line 3756 "configure"
  3756. #include "confdefs.h"
  3757. /* Override any gcc2 internal prototype to avoid an error.  */
  3758. /* We use char because int might match the return type of a gcc2
  3759.     builtin and then its argument prototype would still apply.  */
  3760. char readline();
  3761.  
  3762. int main() {
  3763. readline()
  3764. ; return 0; }
  3765. EOF
  3766. if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3767.   rm -rf conftest*
  3768.   eval "ac_cv_lib_$ac_lib_var=yes"
  3769. else
  3770.   echo "configure: failed program was:" >&5
  3771.   cat conftest.$ac_ext >&5
  3772.   rm -rf conftest*
  3773.   eval "ac_cv_lib_$ac_lib_var=no"
  3774. fi
  3775. rm -f conftest*
  3776. LIBS="$ac_save_LIBS"
  3777.  
  3778. fi
  3779. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3780.   echo "$ac_t""yes" 1>&6
  3781.          TERMLIBS="$TERMLIBS -lreadline $gp_tcap"
  3782. else
  3783.   echo "$ac_t""no" 1>&6
  3784. fi
  3785.  
  3786.     else
  3787.       ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  3788.   gp_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3789.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3790. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  3791. echo "configure:3792: checking for readline in -lreadline" >&5
  3792. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3793.   echo $ac_n "(cached) $ac_c" 1>&6
  3794. else
  3795.   gp_save_TERMLIBS="$TERMLIBS"
  3796. if test "$with_readline" != yes && test "$with_readline" != no; then
  3797.   gp_l_path=`echo "$with_readline" | sed -e 's%/libreadline\.a$%%'`
  3798.   gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'`
  3799.   gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path"
  3800. fi
  3801. for ac_dir in $gp_l_list '' /usr/local/lib ; do
  3802.   test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS"
  3803.   ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  3804. ac_save_LIBS="$LIBS"
  3805. LIBS="$TERMLIBS $TERMXLIBS -lreadline ${gp_tcap} $LIBS"
  3806. cat > conftest.$ac_ext <<EOF
  3807. #line 3808 "configure"
  3808. #include "confdefs.h"
  3809. /* Override any gcc2 internal prototype to avoid an error.  */
  3810. /* We use char because int might match the return type of a gcc2
  3811.     builtin and then its argument prototype would still apply.  */
  3812. char readline();
  3813.  
  3814. int main() {
  3815. readline()
  3816. ; return 0; }
  3817. EOF
  3818. if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3819.   rm -rf conftest*
  3820.   eval "ac_cv_lib_$ac_lib_var=yes"
  3821. else
  3822.   echo "configure: failed program was:" >&5
  3823.   cat conftest.$ac_ext >&5
  3824.   rm -rf conftest*
  3825.   eval "ac_cv_lib_$ac_lib_var=no"
  3826. fi
  3827. rm -f conftest*
  3828. LIBS="$ac_save_LIBS"
  3829. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3830.   ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3831.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3832. fi
  3833.  
  3834.   TERMLIBS="$gp_save_TERMLIBS"
  3835.   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3836.     eval "ac_cv_lib_$ac_lib_var=${ac_dir}"
  3837.     break
  3838.   fi
  3839. done
  3840.  
  3841. fi
  3842.  
  3843. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then
  3844.   if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then
  3845.     eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\""
  3846.   fi
  3847.   TERMLIBS="$TERMLIBS -lreadline"
  3848.   echo "$ac_t""yes" 1>&6
  3849. else
  3850.   echo "$ac_t""no" 1>&6
  3851. fi
  3852.  
  3853.       if test "$ac_cv_lib_readline_readline" != no; then
  3854.         TERMLIBS="$TERMLIBS $gp_tcap"
  3855.       fi
  3856.     fi
  3857.  
  3858.     if test "$ac_cv_lib_readline_readline" = no; then
  3859.       echo "configure: warning: GNU readline not found - falling back to builtin readline" 1>&2
  3860.       with_readline=yes
  3861.     else
  3862.       cat >> confdefs.h <<\EOF
  3863. #define HAVE_LIBREADLINE 1
  3864. EOF
  3865.  
  3866.     fi # ! ac_cv_lib_readline_readline = no
  3867.  
  3868.   fi # ! with_readline != yes
  3869.  
  3870.   if test "$with_readline" = yes; then
  3871.     cat >> confdefs.h <<\EOF
  3872. #define READLINE 1
  3873. EOF
  3874.  
  3875.   fi
  3876.  
  3877. fi
  3878.  
  3879. if test "$with_plot" != no; then
  3880.   if test "$with_plot" = yes; then
  3881.         echo $ac_n "checking for openpl in -lplot""... $ac_c" 1>&6
  3882. echo "configure:3883: checking for openpl in -lplot" >&5
  3883. ac_lib_var=`echo plot'_'openpl | sed 'y%./+-%__p_%'`
  3884. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3885.   echo $ac_n "(cached) $ac_c" 1>&6
  3886. else
  3887.   ac_save_LIBS="$LIBS"
  3888. LIBS="-lplot  $LIBS"
  3889. cat > conftest.$ac_ext <<EOF
  3890. #line 3891 "configure"
  3891. #include "confdefs.h"
  3892. /* Override any gcc2 internal prototype to avoid an error.  */
  3893. /* We use char because int might match the return type of a gcc2
  3894.     builtin and then its argument prototype would still apply.  */
  3895. char openpl();
  3896.  
  3897. int main() {
  3898. openpl()
  3899. ; return 0; }
  3900. EOF
  3901. if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3902.   rm -rf conftest*
  3903.   eval "ac_cv_lib_$ac_lib_var=yes"
  3904. else
  3905.   echo "configure: failed program was:" >&5
  3906.   cat conftest.$ac_ext >&5
  3907.   rm -rf conftest*
  3908.   eval "ac_cv_lib_$ac_lib_var=no"
  3909. fi
  3910. rm -f conftest*
  3911. LIBS="$ac_save_LIBS"
  3912.  
  3913. fi
  3914. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3915.   echo "$ac_t""yes" 1>&6
  3916.        cat >> confdefs.h <<\EOF
  3917. #define UNIXPLOT 1
  3918. EOF
  3919.  
  3920.      TERMLIBS="$TERMLIBS -lplot"
  3921. else
  3922.   echo "$ac_t""no" 1>&6
  3923.      with_plot=no
  3924. fi
  3925.  
  3926.   else
  3927.         TERMXLIBS="$X_LIBS -lXaw -lXmu -lXt -lXext -lX11"
  3928.     ac_lib_var=`echo plot'_'pl_textangle | sed 'y%./+-%__p_%'`
  3929.   gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3930.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3931. echo $ac_n "checking for pl_textangle in -lplot""... $ac_c" 1>&6
  3932. echo "configure:3933: checking for pl_textangle in -lplot" >&5
  3933. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3934.   echo $ac_n "(cached) $ac_c" 1>&6
  3935. else
  3936.   gp_save_TERMLIBS="$TERMLIBS"
  3937. if test "$with_plot" != yes && test "$with_plot" != no; then
  3938.   gp_l_path=`echo "$with_plot" | sed -e 's%/libplot\.a$%%'`
  3939.   gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'`
  3940.   gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path"
  3941. fi
  3942. for ac_dir in $gp_l_list '' /usr/local/lib ; do
  3943.   test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS"
  3944.   ac_lib_var=`echo plot'_'pl_textangle | sed 'y%./+-%__p_%'`
  3945. ac_save_LIBS="$LIBS"
  3946. LIBS="$TERMLIBS $TERMXLIBS -lplot $TERMXLIBS $LIBS"
  3947. cat > conftest.$ac_ext <<EOF
  3948. #line 3949 "configure"
  3949. #include "confdefs.h"
  3950. /* Override any gcc2 internal prototype to avoid an error.  */
  3951. /* We use char because int might match the return type of a gcc2
  3952.     builtin and then its argument prototype would still apply.  */
  3953. char pl_textangle();
  3954.  
  3955. int main() {
  3956. pl_textangle()
  3957. ; return 0; }
  3958. EOF
  3959. if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3960.   rm -rf conftest*
  3961.   eval "ac_cv_lib_$ac_lib_var=yes"
  3962. else
  3963.   echo "configure: failed program was:" >&5
  3964.   cat conftest.$ac_ext >&5
  3965.   rm -rf conftest*
  3966.   eval "ac_cv_lib_$ac_lib_var=no"
  3967. fi
  3968. rm -f conftest*
  3969. LIBS="$ac_save_LIBS"
  3970. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3971.   ac_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3972.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3973. fi
  3974.  
  3975.   TERMLIBS="$gp_save_TERMLIBS"
  3976.   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3977.     eval "ac_cv_lib_$ac_lib_var=${ac_dir}"
  3978.     break
  3979.   fi
  3980. done
  3981.  
  3982. fi
  3983.  
  3984. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then
  3985.   if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then
  3986.     eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\""
  3987.   fi
  3988.   TERMLIBS="$TERMLIBS -lplot"
  3989.   echo "$ac_t""yes" 1>&6
  3990. else
  3991.   echo "$ac_t""no" 1>&6
  3992. fi
  3993.  
  3994.     if test "$ac_cv_lib_plot_pl_textangle" = no; then
  3995.       ac_lib_var=`echo plot'_'textangle | sed 'y%./+-%__p_%'`
  3996.   gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3997.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3998. echo $ac_n "checking for textangle in -lplot""... $ac_c" 1>&6
  3999. echo "configure:4000: checking for textangle in -lplot" >&5
  4000. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4001.   echo $ac_n "(cached) $ac_c" 1>&6
  4002. else
  4003.   gp_save_TERMLIBS="$TERMLIBS"
  4004. if test "$with_plot" != yes && test "$with_plot" != no; then
  4005.   gp_l_path=`echo "$with_plot" | sed -e 's%/libplot\.a$%%'`
  4006.   gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4007.   gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path"
  4008. fi
  4009. for ac_dir in $gp_l_list '' /usr/local/lib ; do
  4010.   test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS"
  4011.   ac_lib_var=`echo plot'_'textangle | sed 'y%./+-%__p_%'`
  4012. ac_save_LIBS="$LIBS"
  4013. LIBS="$TERMLIBS $TERMXLIBS -lplot $TERMXLIBS $LIBS"
  4014. cat > conftest.$ac_ext <<EOF
  4015. #line 4016 "configure"
  4016. #include "confdefs.h"
  4017. /* Override any gcc2 internal prototype to avoid an error.  */
  4018. /* We use char because int might match the return type of a gcc2
  4019.     builtin and then its argument prototype would still apply.  */
  4020. char textangle();
  4021.  
  4022. int main() {
  4023. textangle()
  4024. ; return 0; }
  4025. EOF
  4026. if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4027.   rm -rf conftest*
  4028.   eval "ac_cv_lib_$ac_lib_var=yes"
  4029. else
  4030.   echo "configure: failed program was:" >&5
  4031.   cat conftest.$ac_ext >&5
  4032.   rm -rf conftest*
  4033.   eval "ac_cv_lib_$ac_lib_var=no"
  4034. fi
  4035. rm -f conftest*
  4036. LIBS="$ac_save_LIBS"
  4037. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4038.   ac_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4039.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4040. fi
  4041.  
  4042.   TERMLIBS="$gp_save_TERMLIBS"
  4043.   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4044.     eval "ac_cv_lib_$ac_lib_var=${ac_dir}"
  4045.     break
  4046.   fi
  4047. done
  4048.  
  4049. fi
  4050.  
  4051. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then
  4052.   if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then
  4053.     eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\""
  4054.   fi
  4055.   TERMLIBS="$TERMLIBS -lplot"
  4056.   echo "$ac_t""yes" 1>&6
  4057. else
  4058.   echo "$ac_t""no" 1>&6
  4059. fi
  4060.  
  4061.       if test "$ac_cv_lib_plot_textangle" = no; then
  4062.         TERMXLIBS=
  4063.         ac_lib_var=`echo plot'_'rotate | sed 'y%./+-%__p_%'`
  4064.   gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4065.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4066. echo $ac_n "checking for rotate in -lplot""... $ac_c" 1>&6
  4067. echo "configure:4068: checking for rotate in -lplot" >&5
  4068. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4069.   echo $ac_n "(cached) $ac_c" 1>&6
  4070. else
  4071.   gp_save_TERMLIBS="$TERMLIBS"
  4072. if test "$with_plot" != yes && test "$with_plot" != no; then
  4073.   gp_l_path=`echo "$with_plot" | sed -e 's%/libplot\.a$%%'`
  4074.   gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4075.   gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path"
  4076. fi
  4077. for ac_dir in $gp_l_list '' /usr/local/lib ; do
  4078.   test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS"
  4079.   ac_lib_var=`echo plot'_'rotate | sed 'y%./+-%__p_%'`
  4080. ac_save_LIBS="$LIBS"
  4081. LIBS="$TERMLIBS $TERMXLIBS -lplot  $LIBS"
  4082. cat > conftest.$ac_ext <<EOF
  4083. #line 4084 "configure"
  4084. #include "confdefs.h"
  4085. /* Override any gcc2 internal prototype to avoid an error.  */
  4086. /* We use char because int might match the return type of a gcc2
  4087.     builtin and then its argument prototype would still apply.  */
  4088. char rotate();
  4089.  
  4090. int main() {
  4091. rotate()
  4092. ; return 0; }
  4093. EOF
  4094. if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4095.   rm -rf conftest*
  4096.   eval "ac_cv_lib_$ac_lib_var=yes"
  4097. else
  4098.   echo "configure: failed program was:" >&5
  4099.   cat conftest.$ac_ext >&5
  4100.   rm -rf conftest*
  4101.   eval "ac_cv_lib_$ac_lib_var=no"
  4102. fi
  4103. rm -f conftest*
  4104. LIBS="$ac_save_LIBS"
  4105. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4106.   ac_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4107.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4108. fi
  4109.  
  4110.   TERMLIBS="$gp_save_TERMLIBS"
  4111.   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4112.     eval "ac_cv_lib_$ac_lib_var=${ac_dir}"
  4113.     break
  4114.   fi
  4115. done
  4116.  
  4117. fi
  4118.  
  4119. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then
  4120.   if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then
  4121.     eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\""
  4122.   fi
  4123.   TERMLIBS="$TERMLIBS -lplot"
  4124.   echo "$ac_t""yes" 1>&6
  4125. else
  4126.   echo "$ac_t""no" 1>&6
  4127. fi
  4128.  
  4129.         if test "$ac_cv_lib_plot_rotate" = no; then
  4130.           echo "configure: warning: can't find GNU libplot -- disabling gnugraph terminal" 1>&2
  4131.           with_plot=no
  4132.         else
  4133.           echo "$ac_t"" - using obsolete GNU graphics library" 1>&6
  4134.         fi # old GNU plotlib
  4135.       else
  4136.         echo "$ac_t"" - using GNU plotutils library" 1>&6
  4137.       fi # GNU plotlib pre-2.2
  4138.     else
  4139.       ac_safe=`echo "plotcompat.h" | sed 'y%./+-%__p_%'`
  4140.   ac_tr_hdr=HAVE_`echo plotcompat.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4141. echo $ac_n "checking for plotcompat.h""... $ac_c" 1>&6
  4142. echo "configure:4143: checking for plotcompat.h" >&5
  4143. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4144.   echo $ac_n "(cached) $ac_c" 1>&6
  4145. else
  4146.   gp_save_CPPFLAGS="$CPPFLAGS"
  4147. if test "$with_plot" != yes && test "$with_plot" != no; then
  4148.   gp_h_path=`echo "$with_plot" | sed -e 's%/libplotcompat.h\.a$%%'`
  4149.   gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4150.   gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path"
  4151. else
  4152.   gp_h_list=''
  4153. fi
  4154. for ac_dir in $gp_h_list '' /usr/local/include ; do
  4155.   test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}"
  4156.   cat > conftest.$ac_ext <<EOF
  4157. #line 4158 "configure"
  4158. #include "confdefs.h"
  4159. #include <plotcompat.h>
  4160. EOF
  4161. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4162. { (eval echo configure:4163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4163. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4164. if test -z "$ac_err"; then
  4165.   rm -rf conftest*
  4166.   eval "ac_cv_header_$ac_safe=${ac_dir}"
  4167. else
  4168.   echo "$ac_err" >&5
  4169.   echo "configure: failed program was:" >&5
  4170.   cat conftest.$ac_ext >&5
  4171.   rm -rf conftest*
  4172.   eval "ac_cv_header_$ac_safe=no"
  4173. fi
  4174. rm -f conftest*
  4175.   CPPFLAGS="$gp_save_CPPFLAGS"
  4176.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4177.     break
  4178.   fi
  4179. done
  4180.  
  4181. fi
  4182.  
  4183. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4184.   if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then
  4185.     eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\""
  4186.   fi
  4187.   cat >> confdefs.h <<EOF
  4188. #define $ac_tr_hdr 1
  4189. EOF
  4190.  
  4191.   echo "$ac_t""yes" 1>&6
  4192.           cat >> confdefs.h <<\EOF
  4193. #define HAVE_PLOTCOMPAT_H 1
  4194. EOF
  4195.  
  4196. else
  4197.   echo "$ac_t""no" 1>&6
  4198. echo "configure: warning: found GNU plotutils 2.2+ library but not plotcompat.h" 1>&2
  4199.         echo "configure: warning: please add path to plotcompat.h to CPPFLAGS in Makefile" 1>&2
  4200.       
  4201. fi
  4202.  # plotcompat.h
  4203.     fi # new GNU plotlib
  4204.  
  4205.     if test "$with_plot" != no; then
  4206.       cat >> confdefs.h <<\EOF
  4207. #define GNUGRAPH 1
  4208. EOF
  4209.  
  4210.       cat >> confdefs.h <<\EOF
  4211. #define GNU_PLOTUTILS 1
  4212. EOF
  4213.  
  4214.     fi
  4215.  
  4216.   fi # ! Unix plotlib
  4217. fi
  4218.  
  4219. if test "$with_gd" != no; then
  4220.   ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'`
  4221.   gp_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4222.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4223. echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6
  4224. echo "configure:4225: checking for gdImageCreate in -lgd" >&5
  4225. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4226.   echo $ac_n "(cached) $ac_c" 1>&6
  4227. else
  4228.   gp_save_TERMLIBS="$TERMLIBS"
  4229. if test "$with_gd" != yes && test "$with_gd" != no; then
  4230.   gp_l_path=`echo "$with_gd" | sed -e 's%/libgd\.a$%%'`
  4231.   gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4232.   gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path"
  4233. fi
  4234. for ac_dir in $gp_l_list '' /usr/local/lib ; do
  4235.   test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS"
  4236.   ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'`
  4237. ac_save_LIBS="$LIBS"
  4238. LIBS="$TERMLIBS $TERMXLIBS -lgd  $LIBS"
  4239. cat > conftest.$ac_ext <<EOF
  4240. #line 4241 "configure"
  4241. #include "confdefs.h"
  4242. /* Override any gcc2 internal prototype to avoid an error.  */
  4243. /* We use char because int might match the return type of a gcc2
  4244.     builtin and then its argument prototype would still apply.  */
  4245. char gdImageCreate();
  4246.  
  4247. int main() {
  4248. gdImageCreate()
  4249. ; return 0; }
  4250. EOF
  4251. if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4252.   rm -rf conftest*
  4253.   eval "ac_cv_lib_$ac_lib_var=yes"
  4254. else
  4255.   echo "configure: failed program was:" >&5
  4256.   cat conftest.$ac_ext >&5
  4257.   rm -rf conftest*
  4258.   eval "ac_cv_lib_$ac_lib_var=no"
  4259. fi
  4260. rm -f conftest*
  4261. LIBS="$ac_save_LIBS"
  4262. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4263.   ac_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4264.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4265. fi
  4266.  
  4267.   TERMLIBS="$gp_save_TERMLIBS"
  4268.   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4269.     eval "ac_cv_lib_$ac_lib_var=${ac_dir}"
  4270.     break
  4271.   fi
  4272. done
  4273.  
  4274. fi
  4275.  
  4276. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then
  4277.   if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then
  4278.     eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\""
  4279.   fi
  4280.   TERMLIBS="$TERMLIBS -lgd"
  4281.   echo "$ac_t""yes" 1>&6
  4282. else
  4283.   echo "$ac_t""no" 1>&6
  4284. fi
  4285.  
  4286.   if test "$ac_cv_lib_gd_gdImageCreate" != no; then
  4287.     ac_safe=`echo "gd.h" | sed 'y%./+-%__p_%'`
  4288.   ac_tr_hdr=HAVE_`echo gd.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4289. echo $ac_n "checking for gd.h""... $ac_c" 1>&6
  4290. echo "configure:4291: checking for gd.h" >&5
  4291. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4292.   echo $ac_n "(cached) $ac_c" 1>&6
  4293. else
  4294.   gp_save_CPPFLAGS="$CPPFLAGS"
  4295. if test "$with_gd" != yes && test "$with_gd" != no; then
  4296.   gp_h_path=`echo "$with_gd" | sed -e 's%/libgd.h\.a$%%'`
  4297.   gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4298.   gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path"
  4299. else
  4300.   gp_h_list=''
  4301. fi
  4302. for ac_dir in $gp_h_list '' /usr/local/include ; do
  4303.   test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}"
  4304.   cat > conftest.$ac_ext <<EOF
  4305. #line 4306 "configure"
  4306. #include "confdefs.h"
  4307. #include <gd.h>
  4308. EOF
  4309. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4310. { (eval echo configure:4311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4311. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4312. if test -z "$ac_err"; then
  4313.   rm -rf conftest*
  4314.   eval "ac_cv_header_$ac_safe=${ac_dir}"
  4315. else
  4316.   echo "$ac_err" >&5
  4317.   echo "configure: failed program was:" >&5
  4318.   cat conftest.$ac_ext >&5
  4319.   rm -rf conftest*
  4320.   eval "ac_cv_header_$ac_safe=no"
  4321. fi
  4322. rm -f conftest*
  4323.   CPPFLAGS="$gp_save_CPPFLAGS"
  4324.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4325.     break
  4326.   fi
  4327. done
  4328.  
  4329. fi
  4330.  
  4331. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4332.   if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then
  4333.     eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\""
  4334.   fi
  4335.   cat >> confdefs.h <<EOF
  4336. #define $ac_tr_hdr 1
  4337. EOF
  4338.  
  4339.   echo "$ac_t""yes" 1>&6
  4340.               cat >> confdefs.h <<\EOF
  4341. #define HAVE_LIBGD 1
  4342. EOF
  4343.  
  4344. else
  4345.   echo "$ac_t""no" 1>&6
  4346.             echo "configure: warning: found gd library but not gd.h" 1>&2
  4347.       echo "configure: warning: please add path to gd.h to CPPFLAGS in Makefile" 1>&2
  4348. fi
  4349.  
  4350.   else
  4351.     echo "$ac_t""- see term/gif.trm for download details" 1>&6
  4352.   fi
  4353. fi
  4354.  
  4355. if test "$with_png" != no; then
  4356.   ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
  4357.   gp_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4358.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4359. echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6
  4360. echo "configure:4361: checking for png_info_init in -lpng" >&5
  4361. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4362.   echo $ac_n "(cached) $ac_c" 1>&6
  4363. else
  4364.   gp_save_TERMLIBS="$TERMLIBS"
  4365. if test "$with_png" != yes && test "$with_png" != no; then
  4366.   gp_l_path=`echo "$with_png" | sed -e 's%/libpng\.a$%%'`
  4367.   gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4368.   gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path"
  4369. fi
  4370. for ac_dir in $gp_l_list '' /usr/local/lib ; do
  4371.   test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS"
  4372.   ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
  4373. ac_save_LIBS="$LIBS"
  4374. LIBS="$TERMLIBS $TERMXLIBS -lpng -lz $LIBS"
  4375. cat > conftest.$ac_ext <<EOF
  4376. #line 4377 "configure"
  4377. #include "confdefs.h"
  4378. /* Override any gcc2 internal prototype to avoid an error.  */
  4379. /* We use char because int might match the return type of a gcc2
  4380.     builtin and then its argument prototype would still apply.  */
  4381. char png_info_init();
  4382.  
  4383. int main() {
  4384. png_info_init()
  4385. ; return 0; }
  4386. EOF
  4387. if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4388.   rm -rf conftest*
  4389.   eval "ac_cv_lib_$ac_lib_var=yes"
  4390. else
  4391.   echo "configure: failed program was:" >&5
  4392.   cat conftest.$ac_ext >&5
  4393.   rm -rf conftest*
  4394.   eval "ac_cv_lib_$ac_lib_var=no"
  4395. fi
  4396. rm -f conftest*
  4397. LIBS="$ac_save_LIBS"
  4398. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4399.   ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4400.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4401. fi
  4402.  
  4403.   TERMLIBS="$gp_save_TERMLIBS"
  4404.   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4405.     eval "ac_cv_lib_$ac_lib_var=${ac_dir}"
  4406.     break
  4407.   fi
  4408. done
  4409.  
  4410. fi
  4411.  
  4412. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then
  4413.   if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then
  4414.     eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\""
  4415.   fi
  4416.   TERMLIBS="$TERMLIBS -lpng"
  4417.   echo "$ac_t""yes" 1>&6
  4418. else
  4419.   echo "$ac_t""no" 1>&6
  4420. fi
  4421.  
  4422.   if test "$ac_cv_lib_png_png_info_init" != no; then
  4423.     TERMLIBS="$TERMLIBS -lz"
  4424.     ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
  4425.   ac_tr_hdr=HAVE_`echo png.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4426. echo $ac_n "checking for png.h""... $ac_c" 1>&6
  4427. echo "configure:4428: checking for png.h" >&5
  4428. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4429.   echo $ac_n "(cached) $ac_c" 1>&6
  4430. else
  4431.   gp_save_CPPFLAGS="$CPPFLAGS"
  4432. if test "$with_png" != yes && test "$with_png" != no; then
  4433.   gp_h_path=`echo "$with_png" | sed -e 's%/libpng.h\.a$%%'`
  4434.   gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4435.   gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path"
  4436. else
  4437.   gp_h_list=''
  4438. fi
  4439. for ac_dir in $gp_h_list '' /usr/local/include ; do
  4440.   test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}"
  4441.   cat > conftest.$ac_ext <<EOF
  4442. #line 4443 "configure"
  4443. #include "confdefs.h"
  4444. #include <png.h>
  4445. EOF
  4446. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4447. { (eval echo configure:4448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4448. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4449. if test -z "$ac_err"; then
  4450.   rm -rf conftest*
  4451.   eval "ac_cv_header_$ac_safe=${ac_dir}"
  4452. else
  4453.   echo "$ac_err" >&5
  4454.   echo "configure: failed program was:" >&5
  4455.   cat conftest.$ac_ext >&5
  4456.   rm -rf conftest*
  4457.   eval "ac_cv_header_$ac_safe=no"
  4458. fi
  4459. rm -f conftest*
  4460.   CPPFLAGS="$gp_save_CPPFLAGS"
  4461.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4462.     break
  4463.   fi
  4464. done
  4465.  
  4466. fi
  4467.  
  4468. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4469.   if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then
  4470.     eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\""
  4471.   fi
  4472.   cat >> confdefs.h <<EOF
  4473. #define $ac_tr_hdr 1
  4474. EOF
  4475.  
  4476.   echo "$ac_t""yes" 1>&6
  4477.   :
  4478. else
  4479.   echo "$ac_t""no" 1>&6
  4480.      echo "configure: warning: found png library but not png.h" 1>&2
  4481.      echo "configure: warning: please add path to png.h to CPPFLAGS in Makefile" 1>&2
  4482.     
  4483. fi
  4484.  
  4485.     ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
  4486.   ac_tr_hdr=HAVE_`echo zlib.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4487. echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
  4488. echo "configure:4489: checking for zlib.h" >&5
  4489. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4490.   echo $ac_n "(cached) $ac_c" 1>&6
  4491. else
  4492.   gp_save_CPPFLAGS="$CPPFLAGS"
  4493. if test "$with_png" != yes && test "$with_png" != no; then
  4494.   gp_h_path=`echo "$with_png" | sed -e 's%/libzlib.h\.a$%%'`
  4495.   gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'`
  4496.   gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path"
  4497. else
  4498.   gp_h_list=''
  4499. fi
  4500. for ac_dir in $gp_h_list '' /usr/local/include ; do
  4501.   test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}"
  4502.   cat > conftest.$ac_ext <<EOF
  4503. #line 4504 "configure"
  4504. #include "confdefs.h"
  4505. #include <zlib.h>
  4506. EOF
  4507. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4508. { (eval echo configure:4509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4509. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4510. if test -z "$ac_err"; then
  4511.   rm -rf conftest*
  4512.   eval "ac_cv_header_$ac_safe=${ac_dir}"
  4513. else
  4514.   echo "$ac_err" >&5
  4515.   echo "configure: failed program was:" >&5
  4516.   cat conftest.$ac_ext >&5
  4517.   rm -rf conftest*
  4518.   eval "ac_cv_header_$ac_safe=no"
  4519. fi
  4520. rm -f conftest*
  4521.   CPPFLAGS="$gp_save_CPPFLAGS"
  4522.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4523.     break
  4524.   fi
  4525. done
  4526.  
  4527. fi
  4528.  
  4529. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then
  4530.   if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then
  4531.     eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\""
  4532.   fi
  4533.   cat >> confdefs.h <<EOF
  4534. #define $ac_tr_hdr 1
  4535. EOF
  4536.  
  4537.   echo "$ac_t""yes" 1>&6
  4538.   :
  4539. else
  4540.   echo "$ac_t""no" 1>&6
  4541.      echo "configure: warning: found z library but not zlib.h" 1>&2
  4542.      echo "configure: warning: please add path to zlib.h to CPPFLAGS in Makefile" 1>&2
  4543.     
  4544. fi
  4545.  
  4546.     if test "$ac_cv_header_png_h" != no; then
  4547.       cat > conftest.$ac_ext <<EOF
  4548. #line 4549 "configure"
  4549. #include "confdefs.h"
  4550. #include "png.h"
  4551. #if PNG_LIBPNG_VER < 89
  4552. You lose.
  4553. #endif
  4554.  
  4555. EOF
  4556. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4557.   egrep "You lose" >/dev/null 2>&1; then
  4558.   rm -rf conftest*
  4559.          echo "configure: warning: - libpng too old - not including png driver" 1>&2
  4560.        with_png=no
  4561. fi
  4562. rm -f conftest*
  4563.  
  4564.     else
  4565.       echo "configure: warning: - cannot check png version - compilation may fail" 1>&2
  4566.     fi
  4567.  
  4568.   if test "$with_png" != no; then
  4569.     cat >> confdefs.h <<\EOF
  4570. #define HAVE_LIBPNG 1
  4571. EOF
  4572.  
  4573.   fi
  4574.  
  4575.   else
  4576.     echo "$ac_t""- see term/png.trm for download details" 1>&6
  4577.   fi
  4578. fi
  4579.  
  4580.  
  4581.  
  4582. cat > conftest.$ac_ext <<EOF
  4583. #line 4584 "configure"
  4584. #include "confdefs.h"
  4585. #ifdef SCO
  4586. yes
  4587. #endif
  4588.  
  4589. EOF
  4590. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4591.   egrep "yes" >/dev/null 2>&1; then
  4592.   rm -rf conftest*
  4593.   echo $ac_n "checking for v_opnwk in -lccgi""... $ac_c" 1>&6
  4594. echo "configure:4595: checking for v_opnwk in -lccgi" >&5
  4595. ac_lib_var=`echo ccgi'_'v_opnwk | sed 'y%./+-%__p_%'`
  4596. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4597.   echo $ac_n "(cached) $ac_c" 1>&6
  4598. else
  4599.   ac_save_LIBS="$LIBS"
  4600. LIBS="-lccgi  $LIBS"
  4601. cat > conftest.$ac_ext <<EOF
  4602. #line 4603 "configure"
  4603. #include "confdefs.h"
  4604. /* Override any gcc2 internal prototype to avoid an error.  */
  4605. /* We use char because int might match the return type of a gcc2
  4606.     builtin and then its argument prototype would still apply.  */
  4607. char v_opnwk();
  4608.  
  4609. int main() {
  4610. v_opnwk()
  4611. ; return 0; }
  4612. EOF
  4613. if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4614.   rm -rf conftest*
  4615.   eval "ac_cv_lib_$ac_lib_var=yes"
  4616. else
  4617.   echo "configure: failed program was:" >&5
  4618.   cat conftest.$ac_ext >&5
  4619.   rm -rf conftest*
  4620.   eval "ac_cv_lib_$ac_lib_var=no"
  4621. fi
  4622. rm -f conftest*
  4623. LIBS="$ac_save_LIBS"
  4624.  
  4625. fi
  4626. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4627.   echo "$ac_t""yes" 1>&6
  4628.       cat >> confdefs.h <<\EOF
  4629. #define CGI 1
  4630. EOF
  4631.               TERMLIBS="$TERMLIBS -lccgi"
  4632. else
  4633.   echo "$ac_t""no" 1>&6
  4634. fi
  4635.  
  4636. fi
  4637. rm -f conftest*
  4638.  
  4639.  
  4640. cat > conftest.$ac_ext <<EOF
  4641. #line 4642 "configure"
  4642. #include "confdefs.h"
  4643. #ifdef sun
  4644. yes
  4645. #endif
  4646.  
  4647. EOF
  4648. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4649.   egrep "yes" >/dev/null 2>&1; then
  4650.   rm -rf conftest*
  4651.   echo $ac_n "checking for window_create in -lsuntool""... $ac_c" 1>&6
  4652. echo "configure:4653: checking for window_create in -lsuntool" >&5
  4653. ac_lib_var=`echo suntool'_'window_create | sed 'y%./+-%__p_%'`
  4654. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4655.   echo $ac_n "(cached) $ac_c" 1>&6
  4656. else
  4657.   ac_save_LIBS="$LIBS"
  4658. LIBS="-lsuntool     -lsunwindow -lpixrect $LIBS"
  4659. cat > conftest.$ac_ext <<EOF
  4660. #line 4661 "configure"
  4661. #include "confdefs.h"
  4662. /* Override any gcc2 internal prototype to avoid an error.  */
  4663. /* We use char because int might match the return type of a gcc2
  4664.     builtin and then its argument prototype would still apply.  */
  4665. char window_create();
  4666.  
  4667. int main() {
  4668. window_create()
  4669. ; return 0; }
  4670. EOF
  4671. if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4672.   rm -rf conftest*
  4673.   eval "ac_cv_lib_$ac_lib_var=yes"
  4674. else
  4675.   echo "configure: failed program was:" >&5
  4676.   cat conftest.$ac_ext >&5
  4677.   rm -rf conftest*
  4678.   eval "ac_cv_lib_$ac_lib_var=no"
  4679. fi
  4680. rm -f conftest*
  4681. LIBS="$ac_save_LIBS"
  4682.  
  4683. fi
  4684. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4685.   echo "$ac_t""yes" 1>&6
  4686.       ac_safe=`echo "suntool/sunview.h" | sed 'y%./+-%__p_%'`
  4687. echo $ac_n "checking for suntool/sunview.h""... $ac_c" 1>&6
  4688. echo "configure:4689: checking for suntool/sunview.h" >&5
  4689. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4690.   echo $ac_n "(cached) $ac_c" 1>&6
  4691. else
  4692.   cat > conftest.$ac_ext <<EOF
  4693. #line 4694 "configure"
  4694. #include "confdefs.h"
  4695. #include <suntool/sunview.h>
  4696. EOF
  4697. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4698. { (eval echo configure:4699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4699. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4700. if test -z "$ac_err"; then
  4701.   rm -rf conftest*
  4702.   eval "ac_cv_header_$ac_safe=yes"
  4703. else
  4704.   echo "$ac_err" >&5
  4705.   echo "configure: failed program was:" >&5
  4706.   cat conftest.$ac_ext >&5
  4707.   rm -rf conftest*
  4708.   eval "ac_cv_header_$ac_safe=no"
  4709. fi
  4710. rm -f conftest*
  4711. fi
  4712. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4713.   echo "$ac_t""yes" 1>&6
  4714.       cat >> confdefs.h <<\EOF
  4715. #define SUN 1
  4716. EOF
  4717.     TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect"
  4718. else
  4719.   echo "$ac_t""no" 1>&6
  4720. fi
  4721.  
  4722. else
  4723.   echo "$ac_t""no" 1>&6
  4724. fi
  4725.  
  4726. fi
  4727. rm -f conftest*
  4728.  
  4729.  
  4730.  
  4731. if test "$with_cdwrc" = no; then
  4732.   cat >> confdefs.h <<\EOF
  4733. #define NOCWDRC 1
  4734. EOF
  4735.  
  4736. fi
  4737.  
  4738. if test "$enable_iris" = yes; then
  4739.   echo $ac_n "checking for winopen in -lgl_s""... $ac_c" 1>&6
  4740. echo "configure:4741: checking for winopen in -lgl_s" >&5
  4741. ac_lib_var=`echo gl_s'_'winopen | sed 'y%./+-%__p_%'`
  4742. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4743.   echo $ac_n "(cached) $ac_c" 1>&6
  4744. else
  4745.   ac_save_LIBS="$LIBS"
  4746. LIBS="-lgl_s  $LIBS"
  4747. cat > conftest.$ac_ext <<EOF
  4748. #line 4749 "configure"
  4749. #include "confdefs.h"
  4750. /* Override any gcc2 internal prototype to avoid an error.  */
  4751. /* We use char because int might match the return type of a gcc2
  4752.     builtin and then its argument prototype would still apply.  */
  4753. char winopen();
  4754.  
  4755. int main() {
  4756. winopen()
  4757. ; return 0; }
  4758. EOF
  4759. if { (eval echo configure:4760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4760.   rm -rf conftest*
  4761.   eval "ac_cv_lib_$ac_lib_var=yes"
  4762. else
  4763.   echo "configure: failed program was:" >&5
  4764.   cat conftest.$ac_ext >&5
  4765.   rm -rf conftest*
  4766.   eval "ac_cv_lib_$ac_lib_var=no"
  4767. fi
  4768. rm -f conftest*
  4769. LIBS="$ac_save_LIBS"
  4770.  
  4771. fi
  4772. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4773.   echo "$ac_t""yes" 1>&6
  4774.      cat >> confdefs.h <<\EOF
  4775. #define IRIS 1
  4776. EOF
  4777.  
  4778.    TERMLIBS="$TERMLIBS -lgl_s"
  4779. else
  4780.   echo "$ac_t""no" 1>&6
  4781.    enable_iris=no
  4782. fi
  4783.  
  4784. fi
  4785.  
  4786. if test "$enable_mgr" = yes; then
  4787.   echo $ac_n "checking for m_getinfo in -lmgr""... $ac_c" 1>&6
  4788. echo "configure:4789: checking for m_getinfo in -lmgr" >&5
  4789. ac_lib_var=`echo mgr'_'m_getinfo | sed 'y%./+-%__p_%'`
  4790. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4791.   echo $ac_n "(cached) $ac_c" 1>&6
  4792. else
  4793.   ac_save_LIBS="$LIBS"
  4794. LIBS="-lmgr -lpixrect $LIBS"
  4795. cat > conftest.$ac_ext <<EOF
  4796. #line 4797 "configure"
  4797. #include "confdefs.h"
  4798. /* Override any gcc2 internal prototype to avoid an error.  */
  4799. /* We use char because int might match the return type of a gcc2
  4800.     builtin and then its argument prototype would still apply.  */
  4801. char m_getinfo();
  4802.  
  4803. int main() {
  4804. m_getinfo()
  4805. ; return 0; }
  4806. EOF
  4807. if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4808.   rm -rf conftest*
  4809.   eval "ac_cv_lib_$ac_lib_var=yes"
  4810. else
  4811.   echo "configure: failed program was:" >&5
  4812.   cat conftest.$ac_ext >&5
  4813.   rm -rf conftest*
  4814.   eval "ac_cv_lib_$ac_lib_var=no"
  4815. fi
  4816. rm -f conftest*
  4817. LIBS="$ac_save_LIBS"
  4818.  
  4819. fi
  4820. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4821.   echo "$ac_t""yes" 1>&6
  4822.      cat >> confdefs.h <<\EOF
  4823. #define MGR 1
  4824. EOF
  4825.  
  4826.    TERMLIBS="$TERMLIBS -lmgr -lpixrect"
  4827. else
  4828.   echo "$ac_t""no" 1>&6
  4829.    enable_mgr=no
  4830. fi
  4831.  
  4832. fi
  4833.  
  4834. if test "$enable_rgip" = yes; then
  4835.   cat >> confdefs.h <<\EOF
  4836. #define RGIP 1
  4837. EOF
  4838.  
  4839. fi
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849. eval gp_datadir=$datadir
  4850. test $gp_datadir = NONE/share && gp_datadir=/usr/local/share
  4851. echo "$ac_t""
  4852. ** Configuration summary for $PACKAGE $VERSION:
  4853.  
  4854.   Where is the help file?           $gp_datadir/gnuplot.gih
  4855. " 1>&6
  4856. test "$ac_cv_header_gd_h" = yes && \
  4857.   echo "$ac_t""  Enable generation of GIF files" 1>&6
  4858.  
  4859. test "$ac_cv_header_zlib_h" = yes && \
  4860.   echo "$ac_t""  Enable generation of PNG files" 1>&6
  4861.  
  4862. test "$with_cwdrc" = yes && \
  4863.   echo "$ac_t""  Check current directory for .gnuplot file" 1>&6
  4864.  
  4865. if test "$with_readline" != no; then
  4866.   if test "$with_readline" != yes; then
  4867.     echo "$ac_t""  Use GNU readline library" 1>&6
  4868.       test -n "$gp_tcap" && echo "$ac_t""    with ${gp_tcap}" 1>&6
  4869.   else
  4870.     echo "$ac_t""  Use builtin minimal readline" 1>&6
  4871.   fi
  4872. fi
  4873.  
  4874. if test "$with_plot" = yes; then
  4875.   echo "$ac_t""  Use the Unix plot library" 1>&6
  4876. elif test "$with_plot" != no; then
  4877.   echo "$ac_t""  Use the GNU plot library," 1>&6
  4878.   if test x"$ac_cv_header_plotcompat_h" != x && \
  4879.      test "$ac_cv_header_plotcompat_h" != no ; then
  4880.     echo "$ac_t""    version 2.2 or newer" 1>&6
  4881.   else
  4882.     echo "$ac_t""    version 2.1 or older" 1>&6
  4883.   fi
  4884. fi
  4885.  
  4886. test "$with_lasergnu" = yes && \
  4887.   echo "$ac_t""  Install lasergnu printer script" 1>&6
  4888.  
  4889. if test "$with_linux_vga" = yes; then
  4890.   echo "$ac_t""  Use the Linux SVGA console driver" 1>&6
  4891.   echo "$ac_t""    SECURITY NOTICE: SVGAlib requires that" 1>&6
  4892.   echo "$ac_t""    gnuplot is installed suid root!" 1>&6
  4893. fi
  4894.  
  4895. test "$enable_iris" = yes && \
  4896.   echo "$ac_t""  Enable IRIS terminal" 1>&6
  4897.  
  4898. test "$enable_mgr" = yes && \
  4899.   echo "$ac_t""  Enable MGR terminal" 1>&6
  4900.  
  4901. test "$enable_rgip" = yes && \
  4902.   echo "$ac_t""  Enable RGIP terminal" 1>&6
  4903.  
  4904. test "$no_x" != yes && \
  4905.   echo "$ac_t""  Use the X Window System
  4906. " 1>&6
  4907.  
  4908. trap '' 1 2 15
  4909. cat > confcache <<\EOF
  4910. # This file is a shell script that caches the results of configure
  4911. # tests run on this system so they can be shared between configure
  4912. # scripts and configure runs.  It is not useful on other systems.
  4913. # If it contains results you don't want to keep, you may remove or edit it.
  4914. #
  4915. # By default, configure uses ./config.cache as the cache file,
  4916. # creating it if it does not exist already.  You can give configure
  4917. # the --cache-file=FILE option to use a different cache file; that is
  4918. # what configure does when it calls configure scripts in
  4919. # subdirectories, so they share the cache.
  4920. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  4921. # config.status only pays attention to the cache file if you give it the
  4922. # --recheck option to rerun configure.
  4923. #
  4924. EOF
  4925. # The following way of writing the cache mishandles newlines in values,
  4926. # but we know of no workaround that is simple, portable, and efficient.
  4927. # So, don't put newlines in cache variables' values.
  4928. # Ultrix sh set writes to stderr and can't be redirected directly,
  4929. # and sets the high bit in the cache file unless we assign to the vars.
  4930. (set) 2>&1 |
  4931.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  4932.   *ac_space=\ *)
  4933.     # `set' does not quote correctly, so add quotes (double-quote substitution
  4934.     # turns \\\\ into \\, and sed turns \\ into \).
  4935.     sed -n \
  4936.       -e "s/'/'\\\\''/g" \
  4937.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  4938.     ;;
  4939.   *)
  4940.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  4941.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  4942.     ;;
  4943.   esac >> confcache
  4944. if cmp -s $cache_file confcache; then
  4945.   :
  4946. else
  4947.   if test -w $cache_file; then
  4948.     echo "updating cache $cache_file"
  4949.     cat confcache > $cache_file
  4950.   else
  4951.     echo "not updating unwritable cache $cache_file"
  4952.   fi
  4953. fi
  4954. rm -f confcache
  4955.  
  4956. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4957.  
  4958. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4959. # Let make expand exec_prefix.
  4960. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4961.  
  4962. # Any assignment to VPATH causes Sun make to only execute
  4963. # the first set of double-colon rules, so remove it if not needed.
  4964. # If there is a colon in the path, we need to keep it.
  4965. if test "x$srcdir" = x.; then
  4966.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  4967. fi
  4968.  
  4969. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4970.  
  4971. DEFS=-DHAVE_CONFIG_H
  4972.  
  4973. # Without the "./", some shells look in PATH for config.status.
  4974. : ${CONFIG_STATUS=./config.status}
  4975.  
  4976. echo creating $CONFIG_STATUS
  4977. rm -f $CONFIG_STATUS
  4978. cat > $CONFIG_STATUS <<EOF
  4979. #! /bin/sh
  4980. # Generated automatically by configure.
  4981. # Run this file to recreate the current configuration.
  4982. # This directory was configured as follows,
  4983. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4984. #
  4985. # $0 $ac_configure_args
  4986. #
  4987. # Compiler output produced by configure, useful for debugging
  4988. # configure, is in ./config.log if it exists.
  4989.  
  4990. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4991. for ac_option
  4992. do
  4993.   case "\$ac_option" in
  4994.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4995.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4996.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4997.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4998.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  4999.     exit 0 ;;
  5000.   -help | --help | --hel | --he | --h)
  5001.     echo "\$ac_cs_usage"; exit 0 ;;
  5002.   *) echo "\$ac_cs_usage"; exit 1 ;;
  5003.   esac
  5004. done
  5005.  
  5006. ac_given_srcdir=$srcdir
  5007. ac_given_INSTALL="$INSTALL"
  5008.  
  5009. trap 'rm -fr `echo "Makefile docs/Makefile docs/latextut/Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  5010. EOF
  5011. cat >> $CONFIG_STATUS <<EOF
  5012.  
  5013. # Protect against being on the right side of a sed subst in config.status.
  5014. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  5015.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  5016. $ac_vpsub
  5017. $extrasub
  5018. s%@SHELL@%$SHELL%g
  5019. s%@CFLAGS@%$CFLAGS%g
  5020. s%@CPPFLAGS@%$CPPFLAGS%g
  5021. s%@CXXFLAGS@%$CXXFLAGS%g
  5022. s%@FFLAGS@%$FFLAGS%g
  5023. s%@DEFS@%$DEFS%g
  5024. s%@LDFLAGS@%$LDFLAGS%g
  5025. s%@LIBS@%$LIBS%g
  5026. s%@exec_prefix@%$exec_prefix%g
  5027. s%@prefix@%$prefix%g
  5028. s%@program_transform_name@%$program_transform_name%g
  5029. s%@bindir@%$bindir%g
  5030. s%@sbindir@%$sbindir%g
  5031. s%@libexecdir@%$libexecdir%g
  5032. s%@datadir@%$datadir%g
  5033. s%@sysconfdir@%$sysconfdir%g
  5034. s%@sharedstatedir@%$sharedstatedir%g
  5035. s%@localstatedir@%$localstatedir%g
  5036. s%@libdir@%$libdir%g
  5037. s%@includedir@%$includedir%g
  5038. s%@oldincludedir@%$oldincludedir%g
  5039. s%@infodir@%$infodir%g
  5040. s%@mandir@%$mandir%g
  5041. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  5042. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  5043. s%@INSTALL_DATA@%$INSTALL_DATA%g
  5044. s%@PACKAGE@%$PACKAGE%g
  5045. s%@VERSION@%$VERSION%g
  5046. s%@ACLOCAL@%$ACLOCAL%g
  5047. s%@AUTOCONF@%$AUTOCONF%g
  5048. s%@AUTOMAKE@%$AUTOMAKE%g
  5049. s%@AUTOHEADER@%$AUTOHEADER%g
  5050. s%@MAKEINFO@%$MAKEINFO%g
  5051. s%@install_sh@%$install_sh%g
  5052. s%@AMTAR@%$AMTAR%g
  5053. s%@AMTARFLAGS@%$AMTARFLAGS%g
  5054. s%@SET_MAKE@%$SET_MAKE%g
  5055. s%@CC@%$CC%g
  5056. s%@CPP@%$CPP%g
  5057. s%@U@%$U%g
  5058. s%@ANSI2KNR@%$ANSI2KNR%g
  5059. s%@ERRORFIX@%$ERRORFIX%g
  5060. s%@X_LIBRARIES@%$X_LIBRARIES%g
  5061. s%@GNUPLOT_X11@%$GNUPLOT_X11%g
  5062. s%@X_CFLAGS@%$X_CFLAGS%g
  5063. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  5064. s%@X_LIBS@%$X_LIBS%g
  5065. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  5066. s%@LASERGNU@%$LASERGNU%g
  5067. s%@LINUXSUID@%$LINUXSUID%g
  5068. s%@TERMLIBS@%$TERMLIBS%g
  5069. s%@TERMXLIBS@%$TERMXLIBS%g
  5070.  
  5071. CEOF
  5072. EOF
  5073.  
  5074. cat >> $CONFIG_STATUS <<\EOF
  5075.  
  5076. # Split the substitutions into bite-sized pieces for seds with
  5077. # small command number limits, like on Digital OSF/1 and HP-UX.
  5078. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  5079. ac_file=1 # Number of current file.
  5080. ac_beg=1 # First line for current file.
  5081. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  5082. ac_more_lines=:
  5083. ac_sed_cmds=""
  5084. while $ac_more_lines; do
  5085.   if test $ac_beg -gt 1; then
  5086.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  5087.   else
  5088.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  5089.   fi
  5090.   if test ! -s conftest.s$ac_file; then
  5091.     ac_more_lines=false
  5092.     rm -f conftest.s$ac_file
  5093.   else
  5094.     if test -z "$ac_sed_cmds"; then
  5095.       ac_sed_cmds="sed -f conftest.s$ac_file"
  5096.     else
  5097.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  5098.     fi
  5099.     ac_file=`expr $ac_file + 1`
  5100.     ac_beg=$ac_end
  5101.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  5102.   fi
  5103. done
  5104. if test -z "$ac_sed_cmds"; then
  5105.   ac_sed_cmds=cat
  5106. fi
  5107. EOF
  5108.  
  5109. cat >> $CONFIG_STATUS <<EOF
  5110.  
  5111. CONFIG_FILES=\${CONFIG_FILES-"Makefile docs/Makefile docs/latextut/Makefile"}
  5112. EOF
  5113. cat >> $CONFIG_STATUS <<\EOF
  5114. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  5115.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5116.   case "$ac_file" in
  5117.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  5118.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5119.   *) ac_file_in="${ac_file}.in" ;;
  5120.   esac
  5121.  
  5122.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  5123.  
  5124.   # Remove last slash and all that follows it.  Not all systems have dirname.
  5125.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5126.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5127.     # The file is in a subdirectory.
  5128.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  5129.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  5130.     # A "../" for each directory in $ac_dir_suffix.
  5131.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  5132.   else
  5133.     ac_dir_suffix= ac_dots=
  5134.   fi
  5135.  
  5136.   case "$ac_given_srcdir" in
  5137.   .)  srcdir=.
  5138.       if test -z "$ac_dots"; then top_srcdir=.
  5139.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  5140.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  5141.   *) # Relative path.
  5142.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  5143.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  5144.   esac
  5145.  
  5146.   case "$ac_given_INSTALL" in
  5147.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  5148.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  5149.   esac
  5150.  
  5151.   echo creating "$ac_file"
  5152.   rm -f "$ac_file"
  5153.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  5154.   case "$ac_file" in
  5155.   *Makefile*) ac_comsub="1i\\
  5156. # $configure_input" ;;
  5157.   *) ac_comsub= ;;
  5158.   esac
  5159.  
  5160.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  5161.   sed -e "$ac_comsub
  5162. s%@configure_input@%$configure_input%g
  5163. s%@srcdir@%$srcdir%g
  5164. s%@top_srcdir@%$top_srcdir%g
  5165. s%@INSTALL@%$INSTALL%g
  5166. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  5167. fi; done
  5168. rm -f conftest.s*
  5169.  
  5170. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  5171. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  5172. #
  5173. # ac_d sets the value in "#define NAME VALUE" lines.
  5174. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  5175. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  5176. ac_dC='\3'
  5177. ac_dD='%g'
  5178. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  5179. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  5180. ac_uB='\([     ]\)%\1#\2define\3'
  5181. ac_uC=' '
  5182. ac_uD='\4%g'
  5183. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  5184. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  5185. ac_eB='$%\1#\2define\3'
  5186. ac_eC=' '
  5187. ac_eD='%g'
  5188.  
  5189. if test "${CONFIG_HEADERS+set}" != set; then
  5190. EOF
  5191. cat >> $CONFIG_STATUS <<EOF
  5192.   CONFIG_HEADERS="config.h:config.hin"
  5193. EOF
  5194. cat >> $CONFIG_STATUS <<\EOF
  5195. fi
  5196. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  5197.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5198.   case "$ac_file" in
  5199.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  5200.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5201.   *) ac_file_in="${ac_file}.in" ;;
  5202.   esac
  5203.  
  5204.   echo creating $ac_file
  5205.  
  5206.   rm -f conftest.frag conftest.in conftest.out
  5207.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  5208.   cat $ac_file_inputs > conftest.in
  5209.  
  5210. EOF
  5211.  
  5212. # Transform confdefs.h into a sed script conftest.vals that substitutes
  5213. # the proper values into config.h.in to produce config.h.  And first:
  5214. # Protect against being on the right side of a sed subst in config.status.
  5215. # Protect against being in an unquoted here document in config.status.
  5216. rm -f conftest.vals
  5217. cat > conftest.hdr <<\EOF
  5218. s/[\\&%]/\\&/g
  5219. s%[\\$`]%\\&%g
  5220. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  5221. s%ac_d%ac_u%gp
  5222. s%ac_u%ac_e%gp
  5223. EOF
  5224. sed -n -f conftest.hdr confdefs.h > conftest.vals
  5225. rm -f conftest.hdr
  5226.  
  5227. # This sed command replaces #undef with comments.  This is necessary, for
  5228. # example, in the case of _POSIX_SOURCE, which is predefined and required
  5229. # on some systems where configure will not decide to define it.
  5230. cat >> conftest.vals <<\EOF
  5231. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  5232. EOF
  5233.  
  5234. # Break up conftest.vals because some shells have a limit on
  5235. # the size of here documents, and old seds have small limits too.
  5236.  
  5237. rm -f conftest.tail
  5238. while :
  5239. do
  5240.   ac_lines=`grep -c . conftest.vals`
  5241.   # grep -c gives empty output for an empty file on some AIX systems.
  5242.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  5243.   # Write a limited-size here document to conftest.frag.
  5244.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  5245.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  5246.   echo 'CEOF
  5247.   sed -f conftest.frag conftest.in > conftest.out
  5248.   rm -f conftest.in
  5249.   mv conftest.out conftest.in
  5250. ' >> $CONFIG_STATUS
  5251.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  5252.   rm -f conftest.vals
  5253.   mv conftest.tail conftest.vals
  5254. done
  5255. rm -f conftest.vals
  5256.  
  5257. cat >> $CONFIG_STATUS <<\EOF
  5258.   rm -f conftest.frag conftest.h
  5259.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  5260.   cat conftest.in >> conftest.h
  5261.   rm -f conftest.in
  5262.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  5263.     echo "$ac_file is unchanged"
  5264.     rm -f conftest.h
  5265.   else
  5266.     # Remove last slash and all that follows it.  Not all systems have dirname.
  5267.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5268.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5269.       # The file is in a subdirectory.
  5270.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  5271.     fi
  5272.     rm -f $ac_file
  5273.     mv conftest.h $ac_file
  5274.   fi
  5275. fi; done
  5276.  
  5277. EOF
  5278. cat >> $CONFIG_STATUS <<EOF
  5279.  
  5280. EOF
  5281. cat >> $CONFIG_STATUS <<\EOF
  5282. \
  5283. test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h
  5284. exit 0
  5285. EOF
  5286. chmod +x $CONFIG_STATUS
  5287. rm -fr confdefs* $ac_clean_files
  5288. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  5289.  
  5290.  
  5291.